chiark / gitweb /
Initial draft of test harness arrangements, from chiark. cvs rdiff
authorian <ian>
Sat, 28 Nov 1998 17:18:21 +0000 (17:18 +0000)
committerian <ian>
Sat, 28 Nov 1998 17:18:21 +0000 (17:18 +0000)
-r tochiark-1998-11-17 -r fromchiark-1998-11-28 dnslib; scp + cvs add
harness.c

src/Makefile
src/Makefile.in
src/harness.c [new file with mode: 0644]

index 317af60..e4964af 100644 (file)
@@ -21,15 +21,27 @@ WARNS=      -Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes \
        -Wcast-qual -Wpointer-arith
 WERROR=-Werror
 
+HCPPFLAGS= \
+ -Dsocket=Hsocket -Dfcntl=Hfcntl -Dgettimeofday=Hgettimeofday \
+ -Dsendto=Hsendto -Drecvfrom=Hrecvfrom -Dselect=Hselect -Dconnect=Hconnect \
+ -Dread=Hread -Dwrite=Hwrite -Dclose=Hclose
+
 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 harness.o
 
 all:           dtest
 
-dtest:         $(ALLOBJS)
+harness:       harness.o $(HARNLOBJS)
+
+dtest:         dtest.o $(LIBOBJS)
+
+%_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
index 317af60..e4964af 100644 (file)
@@ -21,15 +21,27 @@ WARNS=      -Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes \
        -Wcast-qual -Wpointer-arith
 WERROR=-Werror
 
+HCPPFLAGS= \
+ -Dsocket=Hsocket -Dfcntl=Hfcntl -Dgettimeofday=Hgettimeofday \
+ -Dsendto=Hsendto -Drecvfrom=Hrecvfrom -Dselect=Hselect -Dconnect=Hconnect \
+ -Dread=Hread -Dwrite=Hwrite -Dclose=Hclose
+
 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 harness.o
 
 all:           dtest
 
-dtest:         $(ALLOBJS)
+harness:       harness.o $(HARNLOBJS)
+
+dtest:         dtest.o $(LIBOBJS)
+
+%_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
diff --git a/src/harness.c b/src/harness.c
new file mode 100644 (file)
index 0000000..e69de29