diff options
Diffstat (limited to 'programs/starter/Makefile')
-rw-r--r-- | programs/starter/Makefile | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/programs/starter/Makefile b/programs/starter/Makefile new file mode 100644 index 000000000..60e95d360 --- /dev/null +++ b/programs/starter/Makefile @@ -0,0 +1,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 |