X-Git-Url: https://git.distorted.org.uk/~mdw/userv-utils/blobdiff_plain/87a7ced4ae2d3da3579931ab784577c7fb5c134e..c852886b720b855ba45f1cfb8f43c0802e8dd61a:/ipif/Makefile diff --git a/ipif/Makefile b/ipif/Makefile index 820ad9a..70e163d 100644 --- a/ipif/Makefile +++ b/ipif/Makefile @@ -16,7 +16,7 @@ # along with userv-utils; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -# $Id: Makefile,v 1.14 2000/06/07 00:59:31 ian Exp $ +# $Id: Makefile,v 1.15 2000/12/11 02:41:27 ian Exp $ OPTIMISE= -O2 CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \ @@ -26,14 +26,21 @@ CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \ etcdir= /etc prefix= /usr/local bindir= $(prefix)/bin +vardir= /var libdir= $(prefix)/lib +sharedir= $(prefix)/share libuserv= $(libdir)/userv +shareuserv= $(sharedir)/userv +varlib= $(vardir)/lib +varlibuserv= $(varlib)/userv +varlibvpn= $(varlibuserv)/vpn etcuserv= $(etcdir)/userv +etcvpn= $(etcdir)/userv/vpn services= $(etcuserv)/services.d -PROGRAM_TARGETS= udptunnel-forwarder +PROGRAM_TARGETS= udptunnel-forwarder udptunnel-reconf TARGETS= service blowfishtest $(PROGRAM_TARGETS) PROGRAMS= udptunnel $(PROGRAM_TARGETS) @@ -46,11 +53,28 @@ OBJS_BFTEST= blowfishtest.o blowfish.o hex.o all: $(TARGETS) install: all - mkdir -p $(libuserv) $(services) + mkdir -p $(libuserv) $(services) $(etcvpn) \ + $(varlibvpn) $(shareuserv) cp -b service $(libuserv)/ipif - cp ipif $(services)/ipif:new cp -b $(PROGRAMS) $(bindir)/. + cp ipif $(services)/ipif:new set -e; cd $(services); test -f ipif || mv ipif:new ipif + cp *.example $(etcvpn)/. + cp udptunnel-vpn-config.m4 udptunnel-vpn-defaults \ + $(shareuserv)/. + +udptunnel-reconf: udptunnel-reconf.pl Makefile + perl -pe ' \ + print "\ +\$$shareuserv= \"$(shareuserv)\";\n\ +\$$etcvpn= \"$(etcvpn)\";\n\ +\$$varlibvpn= \"$(varlibvpn)\";\n" if m#^\# \@\@\@\-#; \ + $$_="" if m/^\# \@\@\@\-/ .. m/^\# \-\@\@\@/; \ + ' \ + <$< >$@.new + chmod +x $@.new + mv -f $@.new $@ + udptunnel-forwarder: $(OBJS_FORWARD) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_FORWARD)