| 1 |
# Openswan master makefile
|
| 2 |
# Copyright (C) 1998-2002 Henry Spencer.
|
| 3 |
# Copyright (C) 2003-2004 Xelerance Corporation
|
| 4 |
#
|
| 5 |
# This program is free software; you can redistribute it and/or modify it
|
| 6 |
# under the terms of the GNU General Public License as published by the
|
| 7 |
# Free Software Foundation; either version 2 of the License, or (at your
|
| 8 |
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
| 9 |
#
|
| 10 |
# This program is distributed in the hope that it will be useful, but
|
| 11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
| 12 |
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
| 13 |
# for more details.
|
| 14 |
#
|
| 15 |
# RCSID $Id: Makefile.top,v 1.4 2005/07/18 03:46:13 mcr Exp $
|
| 16 |
|
| 17 |
|
| 18 |
PATCHES=linux
|
| 19 |
# where KLIPS goes in the kernel
|
| 20 |
# note, some of the patches know the last part of this path
|
| 21 |
KERNELKLIPS=$(KERNELSRC)/net/ipsec
|
| 22 |
KERNELCRYPTODES=$(KERNELSRC)/crypto/ciphers/des
|
| 23 |
KERNELLIBFREESWAN=$(KERNELSRC)/lib/libfreeswan
|
| 24 |
KERNELLIBZLIB=$(KERNELSRC)/lib/zlib
|
| 25 |
KERNELINCLUDE=$(KERNELSRC)/include
|
| 26 |
|
| 27 |
MAKEUTILS=packaging/utils
|
| 28 |
ERRCHECK=${MAKEUTILS}/errcheck
|
| 29 |
KVUTIL=${MAKEUTILS}/kernelversion
|
| 30 |
KVSHORTUTIL=${MAKEUTILS}/kernelversion-short
|
| 31 |
|
| 32 |
SUBDIRS=doc lib programs testing
|
| 33 |
|
| 34 |
clean::
|
| 35 |
-(cd ${OPENSWANSRCDIR} && make modclean && make mod26clean)
|
| 36 |
|
| 37 |
distclean: clean
|
| 38 |
rm -f out.kpatch
|
| 39 |
if [ -f umlsetup.sh ]; then source umlsetup.sh; if [ -d "$$POOLSPACE" ]; then rm -rf $$POOLSPACE; fi; fi
|
| 40 |
|
| 41 |
install_file_list:
|
| 42 |
@for d in $(SUBDIRS) ; \
|
| 43 |
do \
|
| 44 |
(cd $$d && $(MAKE) --no-print-directory srcdir=${OPENSWANSRCDIR}/$$d/ OPENSWANSRCDIR=${OPENSWANSRCDIR} install_file_list ) || exit 1; \
|
| 45 |
done;
|
| 46 |
|
| 47 |
# uninstall, as much as possible
|
| 48 |
uninstall:
|
| 49 |
$(MAKE) --no-print-directory install_file_list | egrep -v '(/ipsec.conf$$|/ipsec.d/)' | xargs rm -f
|
| 50 |
|
| 51 |
taroldinstall:
|
| 52 |
tar --ignore-failed-read -c -z -f oldFreeSWAN.tar.gz `$(MAKE) --no-print-directory install_file_list`
|
| 53 |
|
| 54 |
# some oddities meant for the developers, probably of no use to users
|
| 55 |
|
| 56 |
# make tags and TAGS files from ctags and etags for vi and emacs, respectively.
|
| 57 |
tags TAGS: dummy
|
| 58 |
etags `find lib programs linux -name '*.[ch]'`
|
| 59 |
ctags `find lib programs linux -name '*.[ch]'`
|
| 60 |
|
| 61 |
.PHONY: dummy
|
| 62 |
dummy:
|
| 63 |
|
| 64 |
uml: checkprograms
|
| 65 |
testing/utils/verify-uml.sh
|
| 66 |
-chmod +x testing/utils/make-uml.sh
|
| 67 |
testing/utils/make-uml.sh `pwd`
|
| 68 |
|
| 69 |
umluserland:
|
| 70 |
(touch ${OPENSWANSRCDIR}/Makefile.inc && source ${OPENSWANSRCDIR}/umlsetup.sh && cd $$POOLSPACE && make $$OPENSWANHOSTS $$REGULARHOSTS )
|
| 71 |
|
| 72 |
|
| 73 |
# DESTDIR is normally set in Makefile.inc
|
| 74 |
# These recipes explicitly pass it to the second-level makes so that
|
| 75 |
# DESTDIR can be adjusted for building for UML without changing Makefile.inc
|
| 76 |
# See testing/utils/functions.sh
|
| 77 |
# testing/utils/make-uml.sh
|
| 78 |
# testing/utils/uml-functions.sh
|
| 79 |
check: uml Makefile.ver
|
| 80 |
ifneq ($(strip(${REGRESSRESULTS})),)
|
| 81 |
mkdir -p ${REGRESSRESULTS}
|
| 82 |
endif
|
| 83 |
@for d in $(SUBDIRS); do (cd $$d && $(MAKE) DESTDIR=${DESTDIR} checkprograms || exit 1); done
|
| 84 |
@for d in $(SUBDIRS); \
|
| 85 |
do \
|
| 86 |
echo ===================================; \
|
| 87 |
echo Now making check in $$d; \
|
| 88 |
echo ===================================; \
|
| 89 |
(cd $$d && $(MAKE) DESTDIR=${DESTDIR} check || exit 1);\
|
| 90 |
done
|
| 91 |
ifneq ($(strip(${REGRESSRESULTS})),)
|
| 92 |
-perl testing/utils/regress-summarize-results.pl ${REGRESSRESULTS}
|
| 93 |
endif
|
| 94 |
|
| 95 |
|
| 96 |
|