@@ -1,6 +1,6 @@
[userv-utils] / ipif / Makefile
... / ...
CommitLineData
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
21OPTIMISE= -O2
22CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \
23 -Wwrite-strings -g $(OPTIMISE) -D_GNU_SOURCE \
24 $(XCFLAGS)
25
26etcdir= /etc
27prefix= /usr/local
28bindir= $(prefix)/bin
29
30libdir= $(prefix)/lib
31libuserv= $(libdir)/userv
32
33etcuserv= $(etcdir)/userv
34services= $(etcuserv)/services.d
35
36PROGRAM_TARGETS= udptunnel-forwarder
37TARGETS= service blowfishtest $(PROGRAM_TARGETS)
38PROGRAMS= udptunnel $(PROGRAM_TARGETS)
39
40MECHFILES= null pkcs5 timestamp sequence blowfish
41MECHOBJS= $(foreach m, $(MECHFILES), mech-$m.o)
42
43OBJS_FORWARD= forwarder.o $(MECHOBJS) blowfish.o automech.c utils.c
44OBJS_BFTEST= blowfishtest.o blowfish.o hex.o
45
46all: $(TARGETS)
47
48install: all
49 mkdir -p $(libuserv) $(services)
50 cp -b service $(libuserv)/ipif
51 cp ipif $(services)/ipif:new
52 cp -b $(PROGRAMS) $(bindir)/.
53 set -e; cd $(services); test -f ipif || mv ipif:new ipif
54
55udptunnel-forwarder: $(OBJS_FORWARD)
56 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_FORWARD)
57
58blowfishtest: $(OBJS_BFTEST)
59 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_BFTEST)
60
61automech.h: automechgen.sh Makefile
62 ./$< $(MECHFILES)
63
64automech.c: automech.h
65
66clean:
67 rm -f *.o core automech.[ch] *~ ./#*#
68
69realclean: clean
70 rm -f $(TARGETS)
71
72forwarder.o $(MECHOBJS) automech.o utils.o: forwarder.h automech.h
73blowfish.o mech-blowfish.o blowfishtest.o: blowfish.h
74blowfishtest.o hex.o: hex.h