2007-08-09 13:35:23 +00:00
|
|
|
# On cygwin do:
|
|
|
|
# make CYGWIN=cygwin check
|
|
|
|
|
2007-07-13 19:37:47 +00:00
|
|
|
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
|
2007-08-01 20:53:40 +00:00
|
|
|
# PROF_FLAGS = -pg
|
|
|
|
OPTFLAGS = -O2
|
2007-08-09 13:35:23 +00:00
|
|
|
|
|
|
|
ifeq ($(CYGWIN),cygwin)
|
|
|
|
else
|
|
|
|
FPICFLAGS = -fPIC
|
|
|
|
# valgrind is not present on cygwin
|
2007-08-01 02:37:21 +00:00
|
|
|
DTOOL = valgrind --quiet --error-exitcode=1
|
2007-08-09 13:35:23 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS = -Wall -W $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -Werror $(FPICFLAGS)
|
|
|
|
LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS)
|
|
|
|
|
2007-08-01 02:37:21 +00:00
|
|
|
|
|
|
|
# When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test
|
|
|
|
|
2007-07-13 19:37:47 +00:00
|
|
|
|
|
|
|
default: bins
|
2007-08-24 18:38:11 +00:00
|
|
|
# Put these one-per-line so that if we insert a new one the svn diff can understand it better.
|
|
|
|
# Also keep them sorted.
|
|
|
|
BINS = \
|
|
|
|
benchmark-test \
|
|
|
|
brt-serialize-test \
|
|
|
|
brt-test \
|
|
|
|
cachetable-test \
|
|
|
|
hashtest \
|
|
|
|
pma-test \
|
|
|
|
randbrt \
|
|
|
|
randdb4 \
|
|
|
|
ybt-test \
|
|
|
|
|
2007-07-13 19:37:47 +00:00
|
|
|
bins: $(BINS)
|
|
|
|
check: bins
|
2007-07-31 21:40:30 +00:00
|
|
|
$(DTOOL) ./ybt-test
|
2007-08-01 02:37:21 +00:00
|
|
|
$(DTOOL) ./pma-test
|
|
|
|
$(DTOOL) ./cachetable-test
|
|
|
|
$(DTOOL) ./brt-serialize-test
|
2007-08-01 17:25:22 +00:00
|
|
|
$(DTOOL) ./brt-test
|
2007-08-01 02:37:21 +00:00
|
|
|
$(DTOOL) ./hashtest
|
2007-07-16 13:15:24 +00:00
|
|
|
# ./mdict-test
|
2007-07-13 19:37:47 +00:00
|
|
|
|
|
|
|
# pma: PROF_FLAGS=-fprofile-arcs -ftest-coverage
|
|
|
|
key.o: brttypes.h key.h
|
|
|
|
pma-test.o: pma-internal.h pma.h yerror.h memory.h ../include/ydb-constants.h
|
|
|
|
pma-test: pma.o memory.o key.o ybt.o
|
|
|
|
pma.o: pma.h yerror.h pma-internal.h memory.h key.h ybt.h brttypes.h ../include/ydb-constants.h
|
|
|
|
ybt.o: ybt.h brttypes.h
|
|
|
|
ybt-test: ybt-test.o ybt.o memory.o
|
2007-08-13 19:49:06 +00:00
|
|
|
cachetable.o: cachetable.h hashfun.h
|
2007-08-13 21:53:19 +00:00
|
|
|
brt-test: ybt.o brt.o hashtable.o pma.o memory.o brt-serialize.o cachetable.o header-io.o ybt.o key.o primes.o
|
2007-08-01 02:37:21 +00:00
|
|
|
brt-test.o brt.o: brt.h hashtable.h pma.h brttypes.h cachetable.h
|
2007-07-13 19:37:47 +00:00
|
|
|
brt-serialize-test.o: pma.h yerror.h brt.h memory.h hashtable.h brttypes.h brt-internal.h
|
2007-07-24 15:08:05 +00:00
|
|
|
brt.o: brt.h mdict.h pma.h brttypes.h memory.h brt-internal.h cachetable.h hashtable.h
|
2007-07-13 19:37:47 +00:00
|
|
|
mdict.o: pma.h
|
2007-08-13 19:49:06 +00:00
|
|
|
hashtable.o: hashtable.h brttypes.h memory.h key.h yerror.h ../include/ydb-constants.h hashfun.h
|
2007-07-13 19:37:47 +00:00
|
|
|
memory.o: memory.h
|
2007-08-13 21:53:19 +00:00
|
|
|
primes.o: primes.h
|
|
|
|
hashtest: hashtable.o memory.o primes.o
|
2007-08-21 23:32:17 +00:00
|
|
|
brt-serialize.o: brt.h cachetable.h memory.h mdict.h pma.h brttypes.h brt-internal.h hashtable.h wbuf.h rbuf.h
|
2007-07-13 19:37:47 +00:00
|
|
|
header-io.o: brttypes.h brt-internal.h memory.h
|
|
|
|
mdict-test: hashtable.o pma.o memory.o
|
2007-07-24 20:23:09 +00:00
|
|
|
brt-bigtest: memory.o ybt.o brt.o pma.o cachetable.o key.o hashtable.o brt-serialize.o
|
2007-08-10 21:15:17 +00:00
|
|
|
log-test: log.o memory.o
|
2007-07-13 19:37:47 +00:00
|
|
|
|
2007-08-13 21:53:19 +00:00
|
|
|
brt-serialize-test: brt-serialize-test.o brt-serialize.o memory.o hashtable.o pma.o key.o ybt.o brt.o cachetable.o primes.o
|
2007-07-13 19:37:47 +00:00
|
|
|
|
|
|
|
cachetable-test.o: cachetable.h memory.h
|
|
|
|
cachetable-test: cachetable.o memory.o cachetable-test.o
|
|
|
|
|
2007-08-13 21:53:19 +00:00
|
|
|
benchmark-test: benchmark-test.o ybt.o memory.o brt.o pma.o cachetable.o key.o hashtable.o brt-serialize.o primes.o
|
2007-08-01 20:53:18 +00:00
|
|
|
|
2007-07-13 19:37:47 +00:00
|
|
|
clean:
|
2007-08-01 20:53:18 +00:00
|
|
|
rm -rf *.o hashtest brt-test cachetable-test randbrt randdb4 benchmark-test *.bb *.bbg *.da
|
2007-07-13 19:37:47 +00:00
|
|
|
|
|
|
|
randdb4: LOADLIBES=-ldb
|
|
|
|
randbrt: brt.o hashtable.o cachetable.o memory.o brt-serialize.o
|
|
|
|
TAGS: ../*/*.c ../*/*.h
|
|
|
|
etags ../*/*.c ../*/*.h
|