# Makefile for the KLIPS interface utilities
# Copyright (C) 1998, 1999  Henry Spencer.
# Copyright (C) 1999, 2000, 2001  Richard Guy Briggs
# 
# 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.1.1.1 2004/04/07 09:05:58 louistsai Exp $

include ../../Makefile.inc

CC=gcc
CFLAGS=-O2 -I../net/ipsec -I../../lib -g

CFLAGS+= -Wall
#CFLAGS+= -Wconversion
#CFLAGS+= -Wmissing-prototypes
#CFLAGS+= -Wpointer-arith
#CFLAGS+= -Wcast-qual
#CFLAGS+= -Wmissing-declarations
CFLAGS+= -Wstrict-prototypes
#CFLAGS+= -pedantic
#CFLAGS+= -O3
#CFLAGS+= -W
#CFLAGS+= -Wwrite-strings
#CFLAGS+= -Wbad-function-cast 

ALL=spi eroute spigrp tncfg klipsdebug pf_key
MANDIR8=$(MANTREE)/man8
MANDIR5=$(MANTREE)/man5
FREESWANLIB=../../lib/libfreeswan.a

programs: $(ALL)

check: $(ALL)

install: $(ALL)
	mkdir -p $(BINDIR) $(MANDIR8) $(MANDIR5)
	$(INSTALL) $(ALL) $(BINDIR)

spi: spi.c
	$(CC) $(CFLAGS) -o $@ $? $(FREESWANLIB)

eroute: eroute.c
	$(CC) $(CFLAGS) -o $@ $? $(FREESWANLIB)

spigrp: spigrp.c
	$(CC) $(CFLAGS) -o $@ $? $(FREESWANLIB)

tncfg: tncfg.c
	$(CC) $(CFLAGS) -o $@ $? $(FREESWANLIB)

pf_key: pf_key.c
	$(CC) $(CFLAGS) -o $@ $? $(FREESWANLIB)

klipsdebug: klipsdebug.c
	$(CC) $(CFLAGS) -o $@ $? $(FREESWANLIB)

cleanall: clean

distclean: clean

mostlyclean: clean

realclean: clean

clean:
	rm -f *.o $(ALL)

checkprograms:

