Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. LDLIBS:=../../tdb.o ../../tally.o
  2. CFLAGS:=-I../../.. -Wall -O3 #-g -pg
  3. LDFLAGS:=-L../../..
  4. default: replay_trace tdbtorture tdbdump tdbtool starvation mktdb speed
  5. benchmark: replay_trace
  6. @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
  7. REPLAY_LIBS=$(LDLIBS) ../../str_talloc.o ../../grab_file.o ../../talloc.o ../../noerr.o
  8. replay_trace: replay_trace.c keywords.c $(REPLAY_LIBS)
  9. $(LINK.c) $< $(LOADLIBES) $(REPLAY_LIBS) -o $@
  10. keywords.c: keywords.gperf
  11. gperf $< > $@
  12. check: replay_trace
  13. @rm -f *.reduced_trace
  14. @set -e; for f in tests/*.trace.tar.bz2; do \
  15. tar xvfj $$f; \
  16. ./replay_trace replay.tdb *.reduced_trace; \
  17. rm -f *.reduced_trace; \
  18. done
  19. # Usage: make mytest.trace.tar.bz2 TRACEFILES=*.trace
  20. %.trace.tar.bz2: $(patsubst %.trace,%.reduced_trace,$(wildcard $(TRACEFILES)))
  21. tar cvfj $@ $^
  22. %.reduced_trace: %.trace
  23. @sed 's/\(^[0-9]* traverse\) .*/\1fn/' < $^ > $@
  24. clean:
  25. rm -f replay_trace tdbtorture tdbdump tdbtool speed *.o