Navigation Menu

Skip to content

Commit

Permalink
openvpn: cleanup build recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
RMerl committed Feb 9, 2019
1 parent 4d0f428 commit 40c2463
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions release/src/router/Makefile
Expand Up @@ -4883,36 +4883,16 @@ openvpn: shared openssl lzo openpam zlib openvpn/Makefile
$(MAKE) -C $@ $(PARALLEL_BUILD) $(MAKE) -C $@ $(PARALLEL_BUILD)


openvpn/Makefile: openvpn/Makefile:
ifeq ($(HND_ROUTER),y) ( cd openvpn ; ./autogen.sh && OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
cd $(SRCBASE) && rm -f kernel OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl" \
( cd openvpn ; ./autogen.sh && export OPENSSL_CFLAGS="-I$(TOP)/openssl -I$(LINUX_INC_DIR)/include"; \ CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections $(if $(RTCONFIG_BCMARM),-I$(SRCBASE)/shared/bcmwifi/include)" \
export OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"; \ LDFLAGS="$(EXTRALDFLAGS) -L$(TOP)/nvram$(BCMEX)${EX7} ${EXTRA_NV_LDFLAGS} -lnvram -L$(TOP)/shared -lshared $(if $(RTCONFIG_QTN),-L$(TOP)/libqcsapi_client -lqcsapi_client) -L$(TOP)/zlib -lz -lpthread -ldl -L$(TOP)/lzo/src/.libs -L$(TOP)/openpam/lib/libpam/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections $(if $(RTCONFIG_HTTPS),-I$(TOP)/openssl/include/openssl) $(if $(RTCONFIG_BCMARM),-I$(SRCBASE)/shared/bcmwifi/include) -I$(LINUX_INC_DIR)/include" \ CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include -I$(TOP)/openpam/include -I$(TOP)/shared -I$(SRCBASE)/include" \
LDFLAGS="$(EXTRALDFLAGS) -L$(TOP)/nvram$(BCMEX)$(EX7) -lnvram $(shell if [[ "$(HND_ROUTER)" = "y" ]] ; then echo "-L$(TOP)/wlcsm -lwlcsm"; else echo ""; fi) -L$(TOP)/shared -lshared $(if $(RTCONFIG_QTN),-L$(TOP)/libqcsapi_client -lqcsapi_client) $(if $(RTCONFIG_HTTPS),-L$(TOP)/openssl -lcrypto -lssl) -L$(TOP)/zlib -lz -lpthread -ldl -L$(TOP)/lzo/src/.libs -L$(TOP)/openpam/lib/libpam/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \ IPROUTE="$(if $(RTCONFIG_HND_ROUTER),/bin/ip,/usr/sbin/ip)" IFCONFIG="/sbin/ifconfig" ROUTE="/sbin/route" \
CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include -I$(TOP)/openpam/include -I$(TOP)/shared -I$(SRCBASE)/include -I$(LINUX_INC_DIR)/include" \
IPROUTE="/bin/ip" IFCONFIG="/sbin/ifconfig" ROUTE="/sbin/route" \
$(CONFIGURE) --enable-shared --bindir=/usr/sbin --libdir=/usr/lib \
--disable-debug --enable-management --disable-small \
--disable-selinux --disable-socks \
--enable-plugin-auth-pam --enable-iproute2 \
ac_cv_lib_resolv_gethostbyname=no \
)
#cd openvpn; sed -i 's/build_libtool_libs=no/build_libtool_libs=yes/g' libtool;
cd $(SRCBASE) && ln -sf ../../../../../../../kernel kernel
else
( cd openvpn ; ./autogen.sh && export OPENSSL_CFLAGS="-I$(TOP)/openssl"; \
export OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"; \
CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections $(if $(RTCONFIG_BCMARM),-I$(SRCBASE)/shared/bcmwifi/include) $(if $(RTCONFIG_HTTPS),-I$(TOP)/openssl/include/openssl)" \
LDFLAGS="$(EXTRALDFLAGS) -L$(TOP)/nvram$(BCMEX)${EX7} ${EXTRA_NV_LDFLAGS} -lnvram -L$(TOP)/shared -lshared $(if $(RTCONFIG_QTN),-L$(TOP)/libqcsapi_client -lqcsapi_client) $(if $(RTCONFIG_HTTPS),-L$(TOP)/openssl -lcrypto -lssl) -L$(TOP)/zlib -lz -lpthread -ldl -L$(TOP)/lzo/src/.libs -L$(TOP)/openpam/lib/libpam/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include -I$(TOP)/openpam/include -I$(TOP)/shared -I$(SRCBASE)/include" \
IPROUTE="/usr/sbin/ip" IFCONFIG="/sbin/ifconfig" ROUTE="/sbin/route" \
$(CONFIGURE) --prefix=/usr --bindir=/usr/sbin --libdir=/usr/lib \ $(CONFIGURE) --prefix=/usr --bindir=/usr/sbin --libdir=/usr/lib \
--disable-debug --enable-management --disable-small \ --disable-debug --enable-management --enable-plugin-auth-pam --enable-iproute2 \
--disable-selinux --disable-socks \
--enable-plugin-auth-pam --enable-iproute2 \
ac_cv_lib_resolv_gethostbyname=no \ ac_cv_lib_resolv_gethostbyname=no \
) )
endif


openvpn-clean: openvpn-clean:
[ ! -f openvpn/Makefile ] || $(MAKE) -C openvpn clean [ ! -f openvpn/Makefile ] || $(MAKE) -C openvpn clean
Expand Down

0 comments on commit 40c2463

Please sign in to comment.