Commit c97e6c82 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Makefile hacking. Addreseses #782.

git-svn-id: file:///svn/tokudb@3847 c7de825b-a66e-492c-adef-691d508d4ae1
parent e31cd1bd
# -*- Mode: Makefile -*-
VGRIND = valgrind
OPTFLAGS = -O3
CFLAGS = $(OPTFLAGS) -Wall -W -Wcast-align -Wbad-function-cast -Wextra -Wmissing-noreturn -Wmissing-format-attribute -g3 -ggdb3 -Werror -fPIC -Wshadow -fvisibility=hidden
CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500
LDFLAGS = -lz
DIRS = newbrt src
# src cxx utils db-benchmark-test db-benchmark-test-cxx
include $(patsubst %,$(ROOT)%/Makefile.include,$(DIRS))
ifeq ($(VERBOSE),2)
VERBVERBOSE=-v
MAYBEATSIGN=
else
ifeq ($(VERBOSE),1)
VERBVERBOSE=-q
MAYBEATSIGN=
else
VERBVERBOSE=-q
MAYBEATSIGN=@
endif
endif
ifneq ($(OSX),)
LIBEXT=dylib
SHARED=-dynamiclib
RPATHNAME=-install_name @rpath/$(LIBRARY)
CFLAGS+=-fno-common
else
LIBEXT=so
SHARED=-shared $(EXPORTMAP)
RPATHNAME=
endif
LIBRARY=$(LIBNAME).$(LIBEXT)
TLIBRARY=$(TLIBNAME).$(LIBEXT)
ifeq ($(CYGWIN),cygwin)
else
FPICFLAGS = -fPIC
# valgrind is not present on cygwin
VGRIND = valgrind --quiet --error-exitcode=1 --leak-check=yes
endif
.PHONY: %.check
%.check: %
$(VGRIND) ./$< $(VERBVERBOSE)
......@@ -4,5 +4,5 @@
ROOT =
include Makefile.include
build: $(BINS) $(LIBS)
check: $(patsubst %,%.checkdir,$(DIRS))
# build: $(BINS) $(LIBS)
# check: $(patsubst %,%.checkdir,$(DIRS))
ROOT = ../../
build default: src/tests.builddir
check: src/tests.checkdir
include $(ROOT)Makefile.include
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment