chiark / gitweb /
Actual forwarder program compiles apparently ok.
[userv-utils.git] / ipif / Makefile
index d7bf43fdb2ad6722cebf0ed18aa3b66a9b515721..122a72e4b7d296ed6320ef1c815d25cc4a899066 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 utils.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 utils.o:    forwarder.h automech.h
+blowfish.o mech-blowfish.o:                    blowfish.h