X-Git-Url: https://git.distorted.org.uk/~mdw/userv-utils/blobdiff_plain/6d90651a47ba02af64dcef776eab88a5db24e979..abe75cda09856fedab1d54cc04e0c49b95ece805:/ipif/Makefile diff --git a/ipif/Makefile b/ipif/Makefile index c8f6673..90aa70b 100644 --- a/ipif/Makefile +++ b/ipif/Makefile @@ -1,18 +1,26 @@ # +OPTIMISE= -O2 CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \ - -Wwrite-strings -g -D_GNU_SOURCE + -Wwrite-strings -g $(OPTIMISE) -D_GNU_SOURCE -etc= /etc +etcdir= /etc prefix= /usr/local -libipif= $(prefix)/lib/userv-ipif -etcipif= $(etc)/userv/ipif +bindir= $(prefix)/bin + +libdir= $(prefix)/lib +libuserv= $(libdir)/userv + +etcuserv= $(etcdir)/userv +services= $(etcuserv)/services.d TARGETS= service all: $(TARGETS) install: all - mkdir -p $(libipif) $(etcipif) - cp service alloc.pl $(libdir)/. - touch $(etcipif)/networks + mkdir -p $(libuserv) $(services) + cp service $(libuserv)/ipif + cp ipif $(services)/ipif:new + cp udptunnel $(bindir)/. + set -e; cd $(services); test -f ipif || mv ipif:new ipif