]> git.ozlabs.org Git - ccan/blobdiff - ccan/htable/tools/Makefile
htable: reduce size of htable by storing perfect bitnum, not mask.
[ccan] / ccan / htable / tools / Makefile
index 001e160b78f9936ea9efa7a60ac6592d53338df1..a2cad59f0c2dd7e2edf17fd290d89c7a0112e522 100644 (file)
@@ -1,5 +1,40 @@
-CFLAGS=-Wall -Werror -O3 -I../../..
+CCANDIR=../../..
+CFLAGS=-Wall -Werror -O3 -I$(CCANDIR)
+#CFLAGS=-Wall -Werror -g -I$(CCANDIR)
 
-speed: speed.o ../../hash.o
+CCAN_OBJS:=ccan-tal.o ccan-tal-str.o ccan-tal-grab_file.o ccan-take.o ccan-time.o ccan-str.o ccan-noerr.o ccan-list.o
+
+all: speed stringspeed hsearchspeed
+
+speed: speed.o hash.o $(CCAN_OBJS)
 
 speed.o: speed.c ../htable.h ../htable.c
+
+hash.o: ../../hash/hash.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+
+stringspeed: stringspeed.o hash.o $(CCAN_OBJS)
+
+stringspeed.o: speed.c ../htable.h ../htable.c
+
+hsearchspeed: hsearchspeed.o $(CCAN_OBJS)
+
+clean:
+       rm -f stringspeed speed hsearchspeed *.o
+
+ccan-tal.o: $(CCANDIR)/ccan/tal/tal.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+ccan-tal-str.o: $(CCANDIR)/ccan/tal/str/str.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+ccan-take.o: $(CCANDIR)/ccan/take/take.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+ccan-tal-grab_file.o: $(CCANDIR)/ccan/tal/grab_file/grab_file.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+ccan-time.o: $(CCANDIR)/ccan/time/time.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+ccan-list.o: $(CCANDIR)/ccan/list/list.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+ccan-str.o: $(CCANDIR)/ccan/str/str.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+ccan-noerr.o: $(CCANDIR)/ccan/noerr/noerr.c
+       $(CC) $(CFLAGS) -c -o $@ $<