.PHONY: all clean realclean distclean dist install
PACKAGE:=secnet
-VERSION=0.5.1
+VERSION=0.6.2
VPATH:=@srcdir@
srcdir:=@srcdir@
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
$(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
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, $^)
&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
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: