aboutsummaryrefslogtreecommitdiffstats
path: root/extras/strongswan/vpp_sswan/Makefile
diff options
context:
space:
mode:
authorFan Zhang <fanzhang.oss@gmail.com>2023-03-01 14:45:46 +0000
committerFan Zhang <fanzhang.oss@gmail.com>2023-03-01 15:54:40 +0000
commitad215f211d73e656a149326651fa2017382e51e0 (patch)
treed60d44175fb79dff105df2c96569b05b2162ffe8 /extras/strongswan/vpp_sswan/Makefile
parent2073fe49b6977784c39d4a2acb37ba8ad733c2c4 (diff)
vpp-swan: improve Makefile
Type: improvement Since VPP-SWAN does not really need StrongSwan to be compiled, this patch refines the Makefile to reflect the change. In addition README is updated. Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com> Change-Id: I185957167ac71a44f4d12e78e1dac31c194f80f4
Diffstat (limited to 'extras/strongswan/vpp_sswan/Makefile')
-rw-r--r--extras/strongswan/vpp_sswan/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/extras/strongswan/vpp_sswan/Makefile b/extras/strongswan/vpp_sswan/Makefile
index 336ea6ad915..254b90b3b09 100644
--- a/extras/strongswan/vpp_sswan/Makefile
+++ b/extras/strongswan/vpp_sswan/Makefile
@@ -54,7 +54,7 @@ endif
SOURCES=$(wildcard *.c)
OBJECTS=$(SOURCES:.c=.o)
-all: pull-swan $(TARGET)
+all: pull-swan install-swan $(TARGET)
pull-swan:
@if [ -d "${SWANDIR}" ]; then \
@@ -70,8 +70,14 @@ pull-swan:
mv ${CURDIR}/../../../build-root/build-vpp-native/external/strongswan-${VERSION_SSWAN} ${SWANDIR}
cd ${SWANDIR} && ./autogen.sh
cd ${SWANDIR} && ./configure --prefix=${PREFIX} --sysconfdir=${PREFIX_SYS_CONF} --enable-libipsec --enable-systemd --enable-swanctl --disable-gmp --enable-openssl
+
+install-swan:
+ @if ! [ -f "${SWANDIR}/configure" ]; then \
+ echo "SSWAN not downloaded, please run "make" or "make pull-swan" first." ; \
+ exit 1 ; \
+ fi
cd ${SWANDIR} && make -j$(nproc)
-# cd ${SWANDIR} && sudo make install
+ cd ${SWANDIR} && sudo make install
# check if VPP is installed
ifneq ($(shell test "$(shell ldconfig -p | grep vppinfra.so | awk 'NR==1{print $$1;}')" && echo "yes"), yes)
@@ -103,6 +109,8 @@ install:
cp kernel-vpp.conf $(PLUGINCONF)
clean:
+ rm -f ${SWANARCHIVE}/strongswan-${VERSION_SSWAN}.tar.gz
+ rm -rf ${SWANDIR}
rm -f *.so *.o
-.PHONY: clean install all \ No newline at end of file
+.PHONY: clean install all