+ -Wwrite-strings -g $(OPTIMISE) -D_GNU_SOURCE \
+ $(XCFLAGS)
+
+etcdir= /etc
+prefix= /usr/local
+bindir= $(prefix)/bin
+
+libdir= $(prefix)/lib
+libuserv= $(libdir)/userv
+
+etcuserv= $(etcdir)/userv
+services= $(etcuserv)/services.d
+
+PROGRAM_TARGETS= udptunnel-forwarder
+TARGETS= service blowfishtest $(PROGRAM_TARGETS)
+PROGRAMS= udptunnel $(PROGRAM_TARGETS)
+
+MECHFILES= null pkcs5 timestamp sequence blowfish
+MECHOBJS= $(foreach m, $(MECHFILES), mech-$m.o)
+
+OBJS_FORWARD= forwarder.o $(MECHOBJS) blowfish.o automech.c utils.c
+OBJS_BFTEST= blowfishtest.o blowfish.o hex.o
+
+all: $(TARGETS)
+
+install: all
+ mkdir -p $(libuserv) $(services)
+ cp -b service $(libuserv)/ipif
+ cp ipif $(services)/ipif:new
+ cp -b $(PROGRAMS) $(bindir)/.
+ set -e; cd $(services); test -f ipif || mv ipif:new ipif
+
+udptunnel-forwarder: $(OBJS_FORWARD)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_FORWARD)
+
+blowfishtest: $(OBJS_BFTEST)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_BFTEST)
+
+automech.h: automechgen.sh Makefile
+ ./$< $(MECHFILES)
+
+automech.c: automech.h
+
+clean:
+ rm -f *.o core automech.[ch] *~ ./#*#
+
+realclean: clean
+ rm -f $(TARGETS)