X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2FMakefile;h=39f49fa88077e81ab49276090511e3289c3c97f3;hb=a4f094dd69deb1053384e4015f1711c1200ffa0d;hp=317af60dbed2376bd59bbdff49433eed828172d9;hpb=ef45c911ba71248346e3a516e593d773b2eb5613;p=adns.git diff --git a/src/Makefile b/src/Makefile index 317af60..39f49fa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -21,15 +21,29 @@ WARNS= -Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes \ -Wcast-qual -Wpointer-arith WERROR=-Werror +HCPPFLAGS:= $(foreach F, \ + gettimeofday select \ + socket fcntl connect close \ + sendto recvfrom read write \ +, -D$F=H$F) + LIBOBJS= types.o event.o query.o reply.o general.o setup.o transmit.o parse.o -ALLOBJS= $(LIBOBJS) dtest.o +HARNLOBJS= $(addsuffix _d.o, $(basename $(LIBOBJS))) +ALLOBJS= $(LIBOBJS) $(HARNLOBJS) dtest.o hrecord.o hplayback.o hcommon.o + +all: dtest hrecord +# hplayback + +hrecord: dtest.o hrecord.o hcommon.o $(HARNLOBJS) -all: dtest +dtest: dtest.o $(LIBOBJS) -dtest: $(ALLOBJS) +%_d.o: %.c + $(CC) $(HCPPFLAGS) -c -g -o $@ $< clean: rm -f dtest *.o +$(HARNLOBJS): adns.h internal.h $(LIBOBJS): adns.h internal.h dtest.o: adns.h