chiark / gitweb /
Install udptunnel.
[userv-utils.git] / ipif / Makefile
index fd69b4a06782f1523491f8dc4f2b5907aa1f8b49..90aa70b776de824d4e2b4badac218693fef06e51 100644 (file)
@@ -1,6 +1,26 @@
 #
 
+OPTIMISE=      -O2
 CFLAGS=                -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \
-               -Wwrite-strings -g
+               -Wwrite-strings -g $(OPTIMISE) -D_GNU_SOURCE
 
-all:           service
+etcdir=                /etc
+prefix=                /usr/local
+bindir=                $(prefix)/bin
+
+libdir=                $(prefix)/lib
+libuserv=      $(libdir)/userv
+
+etcuserv=      $(etcdir)/userv
+services=      $(etcuserv)/services.d
+
+TARGETS=       service
+
+all:           $(TARGETS)
+
+install:       all
+               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