X-Git-Url: https://git.distorted.org.uk/~mdw/userv-utils/blobdiff_plain/9028e234bb74a97396855e63d9ca598c1a554dc5..5e8cb121d0061bf38eb33be82b0b026ddafeda63:/ipif/Makefile diff --git a/ipif/Makefile b/ipif/Makefile index 5136656..78b4972 100644 --- a/ipif/Makefile +++ b/ipif/Makefile @@ -24,11 +24,23 @@ include ../settings.make varlibvpn= $(varlibuserv)/vpn -etcvpn= $(etcdir)/userv/vpn +etcuserv= $(etcdir)/userv +etcvpn= $(etcuserv)/vpn -PROGRAM_TARGETS= udptunnel-forwarder udptunnel-reconf -TARGETS= service blowfishtest $(PROGRAM_TARGETS) -PROGRAMS= udptunnel $(PROGRAM_TARGETS) +PROGRAM_TARGETS+= +PROGRAM_TARGETS$(depr)+= udptunnel-forwarder udptunnel-reconf + +TARGETS+= service +TARGETS$(depr)+= blowfishtest +TARGETS+= $(PROGRAM_TARGETS) + +PROGRAMS$(depr)+= udptunnel +PROGRAMS+= $(PROGRAM_TARGETS) + +DIRS+= $(libuserv) $(etcuserv) $(services) +DIRS$(depr)+= $(bindir) $(varlibvpn) $(shareuserv) + +SHAREFILES$(depr)+= udptunnel-vpn-config.m4 udptunnel-vpn-defaults MECHFILES= null pkcs5 timestamp sequence blowfish MECHOBJS= $(foreach m, $(MECHFILES), mech-$m.o) @@ -39,20 +51,20 @@ OBJS_BFTEST= blowfishtest.o blowfish.o hex.o all: $(TARGETS) install: all - mkdir -p $(bindir) $(libuserv) $(services) \ - $(varlibvpn) $(shareuserv) + mkdir -p $(DIRS) cp -b service $(libuserv)/ipif - cp -b $(PROGRAMS) $(bindir)/. + set -e; for f in $(PROGRAMS); do cp -b $$f $(bindir)/.; done cp ipif $(services)/ipif:new set -e; cd $(services); test -f ipif || mv ipif:new ipif - cp udptunnel-vpn-config.m4 udptunnel-vpn-defaults \ - $(shareuserv)/. + set -e; for f in $(SHAREFILES); do cp $$f $(shareuserv)/.; done install-docs: install-examples: - mkdir -p $(etcvpn) - cp *.example $(etcvpn)/. + set -e; if [ "x$depr" = x ]; then \ + mkdir -p $(etcvpn); \ + cp *.example $(etcvpn)/.; \ + fi udptunnel-reconf: udptunnel-reconf.pl Makefile perl -p \