From ad215f211d73e656a149326651fa2017382e51e0 Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Wed, 1 Mar 2023 14:45:46 +0000 Subject: 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 Change-Id: I185957167ac71a44f4d12e78e1dac31c194f80f4 --- extras/strongswan/vpp_sswan/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'extras/strongswan/vpp_sswan/Makefile') 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 -- cgit 1.2.3-korg