Update copyright notices.
[userv-utils] / ipif / Makefile
1 # Makefile for ipif/udptunnel stuff
2
3 # Copyright (C) 1999-2000 Ian Jackson
4 #
5 # This is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with userv-utils; if not, write to the Free Software
17 # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 #
19 # $Id$
20
21 OPTIMISE= -O2
22 CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \
23 -Wwrite-strings -g $(OPTIMISE) -D_GNU_SOURCE
24
25 etcdir= /etc
26 prefix= /usr/local
27 bindir= $(prefix)/bin
28
29 libdir= $(prefix)/lib
30 libuserv= $(libdir)/userv
31
32 etcuserv= $(etcdir)/userv
33 services= $(etcuserv)/services.d
34
35 PROGRAMS= udptunnel udptunnel-forwarder
36 TARGETS= service blowfishtest $(PROGRAMS)
37
38 MECHFILES= null pkcs5 timestamp sequence blowfish
39 MECHOBJS= $(foreach m, $(MECHFILES), mech-$m.o)
40
41 OBJS_FORWARD= forwarder.o $(MECHOBJS) blowfish.o automech.c utils.c
42 OBJS_BFTEST= blowfishtest.o blowfish.o hex.o
43
44 all: $(TARGETS)
45
46 install: all
47 mkdir -p $(libuserv) $(services)
48 cp -b service $(libuserv)/ipif
49 cp ipif $(services)/ipif:new
50 cp -b $(PROGRAMS) $(bindir)/.
51 set -e; cd $(services); test -f ipif || mv ipif:new ipif
52
53 udptunnel-forwarder: $(OBJS_FORWARD)
54 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_FORWARD)
55
56 blowfishtest: $(OBJS_BFTEST)
57 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_BFTEST)
58
59 automech.c automech.h: automechgen.sh Makefile
60 ./$< $(MECHFILES)
61
62 forwarder.o $(MECHOBJS) automech.o utils.o: forwarder.h automech.h
63 blowfish.o mech-blowfish.o blowfishtest.o: blowfish.h
64 blowfishtest.o hex.o: hex.h