X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fntdb%2FMakefile;fp=ccan%2Fntdb%2FMakefile;h=3ce5fd16cb1cadac9d0225dfaef52554a7253a79;hp=ddd439d50374bbf60f445b6b64b2dbead4cbe495;hb=147d9c78b8b6202b3442500e925793f70a5fe364;hpb=d69ef83fcc2434ddaced1831184fb761ae6f09d3 diff --git a/ccan/ntdb/Makefile b/ccan/ntdb/Makefile index ddd439d5..3ce5fd16 100644 --- a/ccan/ntdb/Makefile +++ b/ccan/ntdb/Makefile @@ -1,67 +1,80 @@ -# simple makefile wrapper to run waf +CC=gcc +CFLAGS=-g -O0 -Wall -W -I../../ -I./ +LIBS= -WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf +LIBNTDB_OBJ = ccan_hash.o ccan_tally.o check.o free.o hash.o io.o lock.o open.o summary.o ntdb.o transaction.o traverse.o -all: - $(WAF) build +all: ntdbtorture ntdbtool ntdbdump ntdbrestore ntdbbackup -install: - $(WAF) install +ntdbtorture: tools/ntdbtorture.c libntdb.a + $(CC) $(CFLAGS) -o tools/$@ tools/$@.c libntdb.a $(LIBS) -uninstall: - $(WAF) uninstall +ntdbtool: tools/ntdbtool.c libntdb.a + $(CC) $(CFLAGS) -o tools/$@ tools/$@.c libntdb.a $(LIBS) -test: FORCE - $(WAF) test $(TEST_OPTIONS) +ntdbdump: tools/ntdbdump.c libntdb.a + $(CC) $(CFLAGS) -o tools/$@ tools/$@.c libntdb.a $(LIBS) -testenv: - $(WAF) test --testenv $(TEST_OPTIONS) +ntdbrestore: tools/ntdbrestore.c libntdb.a + $(CC) $(CFLAGS) -o tools/$@ tools/$@.c libntdb.a $(LIBS) -quicktest: - $(WAF) test --quick $(TEST_OPTIONS) +ntdbbackup: tools/ntdbbackup.c libntdb.a + $(CC) $(CFLAGS) -o tools/$@ tools/$@.c libntdb.a $(LIBS) -dist: - touch .tmplock - WAFLOCK=.tmplock $(WAF) dist +libntdb.a: $(LIBNTDB_OBJ) + @echo Creating library $@ + ar r libntdb.a $(LIBNTDB_OBJ) + ranlib libntdb.a -distcheck: - touch .tmplock - WAFLOCK=.tmplock $(WAF) distcheck +check.o: check.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c check.c -o $@ -clean: - $(WAF) clean - -distclean: - $(WAF) distclean +free.o: free.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c free.c -o $@ -reconfigure: configure - $(WAF) reconfigure +hash.o: hash.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c hash.c -o $@ -show_waf_options: - $(WAF) --help +io.o: io.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c io.c -o $@ -# some compatibility make targets -everything: all +lock.o: lock.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c lock.c -o $@ -testsuite: all +open.o: open.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c open.c -o $@ -.PHONY: check -check: test +summary.o: summary.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c summary.c -o $@ -torture: all +ntdb.o: ntdb.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c ntdb.c -o $@ -# this should do an install as well, once install is finished -installcheck: test +transaction.o: transaction.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c transaction.c -o $@ -etags: - $(WAF) etags +traverse.o: traverse.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c traverse.c -o $@ -ctags: - $(WAF) ctags +ccan_hash.o: ../hash/hash.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c ../hash/hash.c -o $@ -pydoctor: - $(WAF) pydoctor +ccan_tally.o: ../tally/tally.c + @echo Compiling $@ + $(CC) $(CFLAGS) -c ../tally/tally.c -o $@ -bin/%:: FORCE - $(WAF) --targets=`basename $@` -FORCE: +clean: + rm -f *.o + rm -f *.a + rm -f tools/ntdbtorture tools/ntdbtool tools/ntdbdump tools/ntdbrestore tools/ntdbbackup