X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fhtable%2Ftools%2FMakefile;h=c8a428a7567ca08458bfe5be6f749ea281c563b6;hb=d10966dc916931204b5e4f734ed08e9e793a8774;hp=a21c51cb55ea12819a050984dc2d35feeaf89406;hpb=95757f0e9d979e7c653e9b53bb640deb4f0ea1f9;p=ccan diff --git a/ccan/htable/tools/Makefile b/ccan/htable/tools/Makefile index a21c51cb..c8a428a7 100644 --- a/ccan/htable/tools/Makefile +++ b/ccan/htable/tools/Makefile @@ -1,20 +1,41 @@ -CFLAGS=-Wall -Werror -O3 -I../../.. -#CFLAGS=-Wall -Werror -g -I../../.. +CCANDIR=../../.. +CFLAGS=-Wall -Werror -O3 -I$(CCANDIR) +#CFLAGS=-Wall -Werror -g -I$(CCANDIR) -all: speed stringspeed hsearchspeed +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 -speed: speed.o hash.o +all: speed stringspeed hsearchspeed density + +speed: speed.o hash.o $(CCAN_OBJS) +density: density.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 ../../talloc.o ../../str_talloc.o ../../grab_file.o ../../str.o ../../time.o ../../noerr.o +stringspeed: stringspeed.o hash.o $(CCAN_OBJS) stringspeed.o: speed.c ../htable.h ../htable.c -hsearchspeed: hsearchspeed.o ../../talloc.o ../../str_talloc.o ../../grab_file.o ../../str.o ../../time.o ../../noerr.o +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 $@ $<