1 LDLIBS:=../../tdb.o ../../tally.o
2 CFLAGS:=-I../../.. -Wall -O3 #-g -pg
5 default: replay_trace tdbtorture tdbdump tdbtool starvation mktdb
7 benchmark: replay_trace
8 @trap "rm -f /tmp/trace.$$$$" 0; for f in benchmarks/*.rz; do if runzip -k $$f -o /tmp/trace.$$$$ && echo -n "$$f": && ./replay_trace --quiet -n 5 replay.tdb /tmp/trace.$$$$ && rm /tmp/trace.$$$$; then rm -f /tmp/trace.$$$$; else exit 1; fi; done
10 REPLAY_LIBS=$(LDLIBS) ../../str_talloc.o ../../grab_file.o ../../talloc.o ../../noerr.o
11 replay_trace: replay_trace.c keywords.c $(REPLAY_LIBS)
12 $(LINK.c) $< $(LOADLIBES) $(REPLAY_LIBS) -o $@
14 keywords.c: keywords.gperf
18 @rm -f *.reduced_trace
19 @set -e; for f in tests/*.trace.tar.bz2; do \
21 ./replay_trace replay.tdb *.reduced_trace; \
22 rm -f *.reduced_trace; \
25 # Usage: make mytest.trace.tar.bz2 TRACEFILES=*.trace
26 %.trace.tar.bz2: $(patsubst %.trace,%.reduced_trace,$(wildcard $(TRACEFILES)))
29 %.reduced_trace: %.trace
30 @sed 's/\(^[0-9]* traverse\) .*/\1fn/' < $^ > $@
33 rm -f replay_trace tdbtorture tdbdump tdbtool *.o