2 # Copyright (C) 2001 Michael Richardson
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by the
6 # Free Software Foundation; either version 2 of the License, or (at your
7 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # RCSID $Id: Makefile,v 1.5 2002/03/27 23:28:25 mcr Exp $
18 include ../../../Makefile.inc
22 FMANDIR=$(MANTREE)/man5
23 PMANDIR=$(MANTREE)/man8
25 FREESWANSRCDIR=../../..
26 FREESWANLIBDIR=${FREESWANSRCDIR}/lib
27 FREESWANINCLS= -I$(FREESWANLIBDIR) -I${FREESWANSRCDIR}
28 FREESWANLIB=$(FREESWANLIBDIR)/libfreeswan.a
30 CFLAGS = -g -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \
31 -Wcast-qual -Wmissing-declarations -Wwrite-strings
32 CFLAGS+= -Wstrict-prototypes
36 HDRDIRS = $(FREESWANINCLS)
38 CPPFLAGS = $(HDRDIRS) $(BYTE_ORDER) -DDEBUG
40 ALLFLAGS = $(CPPFLAGS) $(CFLAGS)
52 # files for a (source) distribution
54 OBJSPING = ikeping.o $(FREESWANLIB)
59 $(INSTALL) $(INSTBINFLAGS) $(BINNAMEPING) $(BINDIR)
60 $(INSTALL) $(INSTMANFLAGS) ikeping.8 $(PMANDIR)/ipsec_ikeping.8
62 $(BINNAMEPING): $(OBJSPING)
63 $(CC) -o $(BINNAMEPING) $(LDFLAGS) $(OBJSPING) $(LIBSPING)
68 # Exuberant Ctags doesn't work if LC_ALL is set to something other than C
70 CTAGSFLAGS = -N --format=1 # fishy options required for Exuberant Ctags
73 LC_ALL=C ctags $(CTAGSFLAGS) $(DISTSRC)
84 $(RM) $(RMFLAGS) $(OBJSPING) *.core core *~ a.out ktrace.out
85 $(RM) $(RMFLAGS) $(BINNAMEPING)
88 echo no checks in lib right now.
91 $(CC) $(COPTS) $(ALLFLAGS) -c $<
93 # These rules are not for production use
95 cd $(FREESWANLIBDIR) ; $(MAKE)
99 checkprograms: ikeping
104 ikeping.o: ${FREESWANSRCDIR}/pluto/constants.h
105 ikeping.o: ${FREESWANSRCDIR}/pluto/packet.h
106 ikeping.o: ${FREESWANSRCDIR}/lib/freeswan.h