-
Notifications
You must be signed in to change notification settings - Fork 213
/
Makefile.top
103 lines (83 loc) · 3.38 KB
/
Makefile.top
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# -*- makefile -*-
# Openswan master makefile
# Copyright (C) 1998-2002 Henry Spencer.
# Copyright (C) 2003-2004 Xelerance Corporation
#
# 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.
PATCHES=linux
# where KLIPS goes in the kernel
# note, some of the patches know the last part of this path
KERNELKLIPS=$(KERNELSRC)/net/ipsec
KERNELCRYPTODES=$(KERNELSRC)/crypto/ciphers/des
KERNELLIBFREESWAN=$(KERNELSRC)/lib/libfreeswan
KERNELLIBZLIB=$(KERNELSRC)/lib/zlib
KERNELINCLUDE=$(KERNELSRC)/include
MAKEUTILS=packaging/utils
ERRCHECK=${MAKEUTILS}/errcheck
KVUTIL=${MAKEUTILS}/kernelversion
KVSHORTUTIL=${MAKEUTILS}/kernelversion-short
SUBDIRS?=lib programs
clean::
-(cd ${OPENSWANSRCDIR} && $(MAKE) modclean && $(MAKE) mod26clean)
-${MAKE} -C tests clean
distclean: clean
rm -f out.kpatch
if [ -f umlsetup.sh ]; then source umlsetup.sh; if [ -d "$$POOLSPACE" ]; then rm -rf $$POOLSPACE; fi; fi
install_file_list:
@for d in $(SUBDIRS) ; \
do \
(cd $$d && $(MAKE) --no-print-directory srcdir=${OPENSWANSRCDIR}/$$d/ OPENSWANSRCDIR=${OPENSWANSRCDIR} install_file_list ) || exit 1; \
done;
# uninstall, as much as possible
uninstall:
$(MAKE) --no-print-directory install_file_list | egrep -v '(/ipsec.conf$$|/ipsec.d/)' | xargs rm -f
taroldinstall:
tar --ignore-failed-read -c -z -f oldFreeSWAN.tar.gz `$(MAKE) --no-print-directory install_file_list`
TAGSFILES=$(wildcard include/*.h include/*/*.h lib/lib*/*.c programs/*/*.h programs/*/*.c linux/include/*.h linux/include/openswan/*.h linux/net/ipsec/*.[ch])
tags: $(TAGSFILES) Makefile.top
@LC_ALL=C ctags $(CTAGSFLAGS) ${TAGSFILES}
cscope:
@ls ${TAGSFILES} > cscope.files
@cscope -b
TAGS: $(TAGSFILES)
@LC_ALL=C etags $(ETAGSFLAGS) ${TAGSFILES}
.PHONY: dummy
dummy:
check: checkprograms
@${MAKE} -C tests check
testlist:
@${MAKE} --silent --no-print-directory -C tests testlist
version:
@echo ${IPSECVERSION}
baseversion:
@echo ${IPSECBASEVERSION}
packagingprep:
@for spec in packaging/*/openswan.spec.in; do \
f=$$(basename $$spec .in); d=$$(dirname $$spec); \
echo $$spec '->' $$d/$$f; \
sed "s/IPSECBASEVERSION/${IPSECBASEVERSION}/" $$spec > $$d/$$f; \
done
echo IPSECBASEVERSION=${IPSECBASEVERSION} > Makefile.ver
distarchive: packagingprep
git archive --prefix=openswan-${IPSECBASEVERSION}/ -o ${HOME}/rpmbuild/SOURCES/openswan-${IPSECBASEVERSION}.tar.gz HEAD
# USE_ variables determine if features are compiled into Openswan.
# export them so that "make env" can get at them
export USE_IPSECPOLICY USE_IKEPING
export USE_KEYRR USE_KLIPS USE_NETKEY USE_VENDORID
export USE_AGGRESSIVE USE_XAUTH USE_XAUTHPAM
export USE_NAT_TRAVERSAL USE_NAT_TRAVERSAL_TRANSPORT_MODE USE_LDAP
export USE_LIBCURL
export USE_WEAKSTUFF USE_NOCRYPTO USE_EXTRACRYPTO
export USE_TAPROOM USE_OBJDIR
export HAVE_STATSD USE_DYNAMICDNS
export USE_IPSEC_CONNECTION_LIMIT IPSEC_CONNECTION_LIMIT
export USE_LIBNSS USE_FIPSCHECK USE_MODP_RFC5114 USE_NM USE_LABELED_IPSEC
export USE_MAST USE_SAREF_KERNEL