X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=Dir.sd.mk;h=915d7573de5313924264996f2950c01e65e38e57;hb=0d0c3b6af54a0c4d9440f48b31de97c1b066458f;hp=4111476a5b1bc9d0d5c2347b783235252509aa8b;hpb=16bce837ffe3527d4e8ed306f4436a86891d6e60;p=secnet.git diff --git a/Dir.sd.mk b/Dir.sd.mk index 4111476..915d757 100644 --- a/Dir.sd.mk +++ b/Dir.sd.mk @@ -20,7 +20,7 @@ .PHONY: all clean realclean distclean dist install PACKAGE:=secnet -VERSION=0.5.1 +VERSION=0.6.2 VPATH:=@srcdir@ srcdir:=@srcdir@ @@ -50,14 +50,14 @@ TARGETS:=secnet OBJECTS:=secnet.o util.o conffile.yy.o conffile.tab.o conffile.o modules.o \ resolver.o random.o udp.o site.o transform-cbcmac.o transform-eax.o \ - comm-common.o polypath.o \ + comm-common.o polypath.o privcache.o pubkeys.o pubkeys.yy.o \ netlink.o rsa.o dh.o serpent.o serpentbe.o \ md5.o sha512.o tun.o slip.o sha1.o ipaddr.o log.o \ - process.o @LIBOBJS@ \ - hackypar.o + process.o osdep.o @LIBOBJS@ \ + hackypar.o base91s/base91.o # version.o is handled specially below and in the link rule for secnet. -PYMODULES := ipaddrset.py argparseactionnoyes.py +PYMODULES := ipaddrset.py argparseactionnoyes.py base91.py TEST_OBJECTS:=eax-aes-test.o eax-serpent-test.o eax-serpentbe-test.o \ eax-test.o aes.o @@ -75,17 +75,27 @@ STALE_PYTHON_FILES= $(foreach e, py pyc, \ $(DESTDIR)$p/share/secnet/$l.$e \ ))) -%.c: %.y +%.yy.c %.yy.h: %.fl + flex --header=$*.yy.h -o$*.yy.c $< -%.yy.c: %.fl - flex --header=$*.yy.h -o$@ $< +%.c: %.y +# make has a builtin rule to run yacc, but we don't want that because +# our conffile.c is handwritten, and we use conffile.yy.c for the +# bison output. There is no need to do likewise for flex because +# our flex input files are end in .fl, not .l. %.tab.c %.tab.h: %.y bison -d -o $@ $< -%.o: %.c conffile.yy.h +%.o: %.c $(CC) $(CPPFLAGS) $(ALL_CFLAGS) $(CDEPS_CFLAGS) -c $< -o $@ +$(OBJECTS): conffile.yy.h pubkeys.yy.h base91s/base91.h +# ^ we can't write this as a dependency on the %.o %.c rule +# because (say) conffile.yy.c isn't mentioned so doesn't "ought +# to exist" in make's mind. But specifying it explicitly like this +# works. + all:: $(TARGETS) ${srcdir}/config.h.in: configure.ac @@ -96,12 +106,11 @@ MAKEFILE_TEMPLATES += config.h.in CONFIG_STATUS_OUTPUTS += config.h # Manual dependencies section -conffile.yy.c: conffile.fl conffile.tab.c -conffile.yy.h: conffile.yy.c -conffile.tab.c: conffile.y +conffile.yy.c: conffile.tab.c +%.tab.c: %.y # End of manual dependencies section -conffile.yy.o: ALL_CFLAGS += -Wno-sign-compare +%.yy.o: ALL_CFLAGS += -Wno-sign-compare -Wno-unused-function secnet: $(OBJECTS) $(MAKE) -f main.mk version.o # *.o $(filter-out %.o, $^) @@ -125,10 +134,9 @@ TESTDIRS=stest mtest &TARGETS_fullcheck += $(&TARGETS_check) &TARGETS_fullcheck += msgcode-test.confirm -recheck: - rm -f $(&TARGETS_check) - rm -rf $(addsuffix /d-*, $(TESTDIRS)) - $(MAKE) -f main.mk check +RECHECK_RM += $(&TARGETS_check) + +recheck: check .PHONY: FORCE version.c: FORCE @@ -163,6 +171,11 @@ ipaddrset.confirm: ipaddrset-test.py ipaddrset.py ipaddrset-test.expected diff -u $(srcdir)/ipaddrset-test.expected ipaddrset-test.new touch $@ +&CLEAN += & pubkeys.fl + +pubkeys.fl: ${srcdir}/pubkeys.fl.pl + ${srcdir}/pubkeys.fl.pl >$@.tmp && mv -f $@.tmp $@ + .PRECIOUS: eax-%-test installdirs: