mariadb/Makefile.new
Bradley C. Kuszmaul e9d3b87315 Hacking makefiles. Addresses #782.
git-svn-id: file:///svn/tokudb@3793 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-04 22:07:52 +00:00

54 lines
1.2 KiB
Text

# ROOT is the the name of the root of the tokudb make directory heirarchy, starting at the cwd
ROOT =
default: build
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 %,%/Makefile.include,$(DIRS))
build: $(BINS) $(LIBS)
check: $(CHECKS)
ifeq ($(VERBOSE),2)
VERBVERBOSE=-v
MAYBEATSIGN=
else
ifeq ($(VERBOSE),1)
VERBVERBOSE=-q
MAYBEATSIGN=
else
VERBVERBOSE=-q
MAYBEATSIGN=@
endif
endif
ifneq ($(OSX),)
LIBRARY=$(LIBNAME).dylib
TLIBRARY=$(TLIBNAME).dylib
SHARED=-dynamiclib
RPATHNAME=-install_name @rpath/$(LIBRARY)
CFLAGS+=-fno-common
else
LIBRARY=$(LIBNAME).so
TLIBRARY=$(TLIBNAME).so
SHARED=-shared $(EXPORTMAP)
RPATHNAME=
endif
ifeq ($(CYGWIN),cygwin)
else
FPICFLAGS = -fPIC
# valgrind is not present on cygwin
VGRIND = valgrind --quiet --error-exitcode=1 --leak-check=yes
endif
%.check: %
$(VGRIND) ./$< $(VERBVERBOSE)