blob: 60e95d3600cf413faca1975f0150703d67c52a20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
# ipsec starter Makefile
# Copyright (C) 2001 Mathieu Lafon - Arkoon Network Security
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# RCSID $Id: Makefile,v 1.14 2006/02/17 19:34:02 as Exp $
FREESWANSRCDIR?=$(shell cd ../..; pwd)
include ${FREESWANSRCDIR}/Makefile.inc
LD=$(CC)
RM=rm
LEX=flex
BISON=bison
GPERF=gperf
FREESWANDIR=../..
FREESWANLIB=$(FREESWANDIR)/lib/libfreeswan/libfreeswan.a
PLUTODIR=../pluto
OPENACDIR=../openac
DEFINES+= -DVIRTUAL_IP -DDEBUG
# This compile option activates the leak detective
ifeq ($(USE_LEAK_DETECTIVE),true)
DEFINES+= -DLEAK_DETECTIVE
endif
INCLUDES=-I${FREESWANDIR}/linux/include
CFLAGS=$(DEFINES) $(INCLUDES) -Wall
CFLAGS+=-DIPSEC_EXECDIR=\"${FINALLIBEXECDIR}\" -DIPSEC_CONFDDIR=\"${FINALCONFDDIR}\"
CFLAGS+=-DIPSEC_CONFDIR=\"${FINALCONFDIR}\"
LDFLAGS=
PLUTO_OBJS=defs.o
OBJS=starter.o parser.tab.o lex.yy.o keywords.o args.o invokepluto.o \
starterwhack.o klips.o netkey.o interfaces.o exec.o cmp.o confread.o \
loglite.o ${PLUTO_OBJS}
DISTSRC=$(OBJS:.o=.c)
DISTSRC+=cmp.h confread.h confwrite.h exec.h files.h interfaces.h klips.h netkey.h
DISTSRC+=parser.h args.h invokepluto.h starterwhack.h keywords.h keywords.txt
LIBS=$(FREESWANLIB)
PROGRAM=starter
include ../Makefile.program
all: starter
starter: $(OBJS) $(FREESWANLIB)
$(LD) $(LDFLAGS) -o starter $(OBJS) $(LIBS)
lex.yy.c: parser.tab.c parser.l parser.y parser.h
$(LEX) parser.l
parser.tab.c: parser.l parser.y parser.h
$(BISON) -v -d parser.y
keywords.c: keywords.txt keywords.h
$(GPERF) -C -G -t < keywords.txt > keywords.c
.c.o:
$(CC) $(CFLAGS) -c $<
loglite.o : $(OPENACDIR)/loglite.c $(PLUTODIR)/log.h
$(CC) $(CFLAGS) -c -o $@ $<
# pluto library
defs.o : $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
$(CC) $(CFLAGS) -c -o $@ $<
clean::
$(RM) -f starter $(OBJS) parser.tab.* lex.yy.*
# Stolen from pluto/Makefile
gatherdeps:
@ls | grep '\.c$$' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
@echo
@ls | grep '\.c$$' | xargs grep '^#[ ]*include[ ]*"' | \
sed -e 's/\.c:#[ ]*include[ ]*"/.o: /' -e 's/".*//'
# Dependencies generated by "make gatherdeps":
args.o: args.c
cmp.o: cmp.c
confread.o: confread.c
exec.o: exec.c
interfaces.o: interfaces.c
invokepluto.o: invokepluto.c
keywords.o: keywords.c
klips.o: klips.c
lex.yy.o: lex.yy.c
netkey.o: netkey.c
parser.tab.o: parser.tab.c
starter.o: starter.c
starterwhack.o: starterwhack.c
args.o: ../pluto/constants.h
args.o: ../pluto/defs.h
args.o: ../pluto/log.h
args.o: keywords.h
args.o: parser.h
args.o: confread.h
args.o: args.h
cmp.o: ../pluto/constants.h
cmp.o: ../pluto/defs.h
cmp.o: confread.h
cmp.o: args.h
cmp.o: interfaces.h
cmp.o: cmp.h
confread.o: ../pluto/constants.h
confread.o: ../pluto/defs.h
confread.o: ../pluto/log.h
confread.o: keywords.h
confread.o: parser.h
confread.o: confread.h
confread.o: args.h
confread.o: interfaces.h
exec.o: ../pluto/constants.h
exec.o: ../pluto/defs.h
exec.o: ../pluto/log.h
exec.o: exec.h
interfaces.o: ../pluto/constants.h
interfaces.o: ../pluto/defs.h
interfaces.o: ../pluto/log.h
interfaces.o: interfaces.h
interfaces.o: exec.h
interfaces.o: files.h
invokepluto.o: ../pluto/constants.h
invokepluto.o: ../pluto/defs.h
invokepluto.o: ../pluto/log.h
invokepluto.o: confread.h
invokepluto.o: invokepluto.h
invokepluto.o: files.h
invokepluto.o: starterwhack.h
keywords.o: keywords.h
klips.o: ../pluto/constants.h
klips.o: ../pluto/defs.h
klips.o: ../pluto/log.h
klips.o: confread.h
klips.o: klips.h
klips.o: files.h
klips.o: exec.h
lex.yy.o: parser.tab.h
netkey.o: ../pluto/constants.h
netkey.o: ../pluto/defs.h
netkey.o: ../pluto/log.h
netkey.o: files.h
parser.tab.o: ../pluto/constants.h
parser.tab.o: ../pluto/defs.h
parser.tab.o: parser.h
starter.o: ../pluto/constants.h
starter.o: ../pluto/defs.h
starter.o: ../pluto/log.h
starter.o: confread.h
starter.o: files.h
starter.o: starterwhack.h
starter.o: invokepluto.h
starter.o: klips.h
starter.o: netkey.h
starter.o: cmp.h
starter.o: interfaces.h
starterwhack.o: ../pluto/constants.h
starterwhack.o: ../pluto/defs.h
starterwhack.o: ../pluto/log.h
starterwhack.o: ../pluto/whack.h
starterwhack.o: starterwhack.h
starterwhack.o: confread.h
starterwhack.o: files.h
|