chiark / gitweb /
@@ -1,6 +1,7 @@
[userv-utils.git] / ipif / Makefile
index d7bf43fdb2ad6722cebf0ed18aa3b66a9b515721..4637bbc2646514f0f5a6428b6df1f3ea6752e43d 100644 (file)
@@ -30,7 +30,12 @@ libuserv=    $(libdir)/userv
 etcuserv=      $(etcdir)/userv
 services=      $(etcuserv)/services.d
 
-TARGETS=       service
+TARGETS=       service udptunnel-forwarder
+
+MECHFILES=     null pkcs5 timestamp sequence blowfish
+MECHOBJS=      $(foreach m, $(MECHFILES), mech-$m.o)
+
+OBJS_FORWARD=  forwarder.o $(MECHOBJS) blowfish.o automech.c
 
 all:           $(TARGETS)
 
@@ -40,3 +45,12 @@ install:     all
                cp ipif $(services)/ipif:new
                cp -b udptunnel $(bindir)/.
                set -e; cd $(services); test -f ipif || mv ipif:new ipif
+
+udptunnel-forwarder:   $(OBJS_FORWARD)
+               $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_FORWARD)
+
+automech.c automech.h:         automechgen.sh Makefile
+               ./$< $(MECHFILES)
+
+forwarder.o $(MECHOBJS) automech.o:    mech.h automech.h
+blowfish.o mech-blowfish.o:            blowfish.h