Merge udptunnelconf branch; cvs up -j branchpoint-2000-12-10-udptunnelconf -j mergepo...
[userv-utils] / ipif / Makefile-udptunnelconf
1 # Makefile for udptunnelconf
2
3 # Copyright (C) 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 etcdir= /etc
22 prefix= /usr/local
23 bindir= $(prefix)/bin
24
25 sharedir= $(prefix)/share/udptunnelconf
26
27 etcuserv= $(etcdir)/userv
28 services= $(etcuserv)/services.d
29
30 PROGRAM_TARGETS= udptunnel-forwarder
31 TARGETS= service blowfishtest $(PROGRAM_TARGETS)
32 PROGRAMS= udptunnel $(PROGRAM_TARGETS)
33
34 MECHFILES= null pkcs5 timestamp sequence blowfish
35 MECHOBJS= $(foreach m, $(MECHFILES), mech-$m.o)
36
37 OBJS_FORWARD= forwarder.o $(MECHOBJS) blowfish.o automech.c utils.c
38 OBJS_BFTEST= blowfishtest.o blowfish.o hex.o
39
40 all: $(TARGETS)
41
42 install: all
43 mkdir -p $(libuserv) $(services)
44 cp -b service $(libuserv)/ipif
45 cp ipif $(services)/ipif:new
46 cp -b $(PROGRAMS) $(bindir)/.
47 set -e; cd $(services); test -f ipif || mv ipif:new ipif
48
49 udptunnel-forwarder: $(OBJS_FORWARD)
50 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_FORWARD)
51
52 blowfishtest: $(OBJS_BFTEST)
53 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_BFTEST)
54
55 automech.h: automechgen.sh Makefile
56 ./$< $(MECHFILES)
57
58 automech.c: automech.h
59
60 clean:
61 rm -f *.o core automech.[ch] *~ ./#*#
62
63 realclean: clean
64 rm -f $(TARGETS)
65
66 forwarder.o $(MECHOBJS) automech.o utils.o: forwarder.h automech.h
67 blowfish.o mech-blowfish.o blowfishtest.o: blowfish.h
68 blowfishtest.o hex.o: hex.h