mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
4f5584d7fe
git-svn-id: file:///svn/toku/tokudb@44780 c7de825b-a66e-492c-adef-691d508d4ae1
29 lines
785 B
Makefile
29 lines
785 B
Makefile
SRCS = $(wildcard *.c)
|
|
TARGETS = $(patsubst %.c,%,$(SRCS)) $(patsubst %.c,%-bdb,$(SRCS))
|
|
CPPFLAGS = -I../include -D_GNU_SOURCE
|
|
CFLAGS = -g -std=c99 -Wall
|
|
ifeq ($(USE_STATIC_LIBS),1)
|
|
LIBTOKUDB = tokudb_static
|
|
LIBTOKUPORTABILITY = tokuportability_static
|
|
else
|
|
LIBTOKUDB = tokudb
|
|
LIBTOKUPORTABILITY = tokuportability
|
|
endif
|
|
LDFLAGS = -L../lib -l$(LIBTOKUDB) -l$(LIBTOKUPORTABILITY) -Wl,-rpath,../lib -lpthread -lz -ldl
|
|
|
|
default local: $(TARGETS)
|
|
|
|
%: %.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
%-bdb: %.c
|
|
$(CC) -D_GNU_SOURCE -DBDB $(CFLAGS) $^ -o $@ -ldb
|
|
|
|
check: $(TARGETS)
|
|
./db-insert -x && ./db-scan --lwc --prelock --prelockflag
|
|
|
|
checknox: $(TARGETS)
|
|
./db-insert && ./db-scan --nox --lwc --prelock --prelockflag
|
|
|
|
clean:
|
|
rm -rf $(TARGETS) bench.* update.env.* insertm.env.*
|