diff options
author | Martin Willi <martin@strongswan.org> | 2006-04-28 10:51:19 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-04-28 10:51:19 +0000 |
commit | 1029d84d2365ca6e6b2d2a96e5c0a1fad3c127e3 (patch) | |
tree | d7d1152d0651f01f023b4faa09fc51f936f89e60 /src/starter/Makefile | |
parent | 51c3484a9f70f03b2ea73151428a40e785c0c56c (diff) | |
download | strongswan-1029d84d2365ca6e6b2d2a96e5c0a1fad3c127e3.tar.bz2 strongswan-1029d84d2365ca6e6b2d2a96e5c0a1fad3c127e3.tar.xz |
Diffstat (limited to 'src/starter/Makefile')
-rw-r--r-- | src/starter/Makefile | 200 |
1 files changed, 200 insertions, 0 deletions
diff --git a/src/starter/Makefile b/src/starter/Makefile new file mode 100644 index 000000000..0aeceb60f --- /dev/null +++ b/src/starter/Makefile @@ -0,0 +1,200 @@ +# 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 + +# Enable charon support +ifeq ($(USE_IKEV2),true) + DEFINES+= -DIKEV2 +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 netkey.o interfaces.o exec.o cmp.o confread.o \ + loglite.o ${PLUTO_OBJS} + +# Build charon-only objs +ifeq ($(USE_IKEV2),true) + OBJS+= invokecharon.o starterstroke.o +endif + +DISTSRC=$(OBJS:.o=.c) +DISTSRC+=cmp.h confread.h confwrite.h exec.h files.h interfaces.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": + +aargs.o: args.c +cmp.o: cmp.c +confread.o: confread.c +exec.o: exec.c +interfaces.o: interfaces.c +invokecharon.o: invokecharon.c +invokepluto.o: invokepluto.c +keywords.o: keywords.c +lex.yy.o: lex.yy.c +netkey.o: netkey.c +parser.tab.o: parser.tab.c +starter.o: starter.c +starterstroke.o: starterstroke.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 +invokecharon.o: ../pluto/constants.h +invokecharon.o: ../pluto/defs.h +invokecharon.o: ../pluto/log.h +invokecharon.o: confread.h +invokecharon.o: invokecharon.h +invokecharon.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 +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: ../pluto/log.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: invokecharon.h +starter.o: netkey.h +starter.o: cmp.h +starter.o: interfaces.h +starterstroke.o: ../pluto/constants.h +starterstroke.o: ../pluto/defs.h +starterstroke.o: ../pluto/log.h +starterstroke.o: ../charon/stroke/stroke.h +starterstroke.o: starterstroke.h +starterstroke.o: confread.h +starterstroke.o: files.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 |