mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
8455cf0c1c
git-svn-id: file:///svn/tokudb@3847 c7de825b-a66e-492c-adef-691d508d4ae1
48 lines
1 KiB
Makefile
48 lines
1 KiB
Makefile
# -*- 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)
|