packages/net/sslh/Makefile
Florian Fainelli 37e8aa3639 sslh: Also pass down TARGET_CPPFLAGS
Make sure we do pass TARGET_CPPFLAGS using CPPFLAGS (which is supported
by sslh's Makefile), fixing build issues with some external toolchains:

mipsel-linux-gnu-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc
-fno-caller-saves -Wno-unused-result  -D_FORTIFY_SOURCE=1 -Wl,-z,now
-Wl,-z,relro -DENABLE_REGEX -DLIBCONFIG -c sslh-main.c
sslh-main.c:26:23: fatal error: libconfig.h: No such file or directory
 #include <libconfig.h>
                       ^
compilation terminated.
Makefile:63: recipe for target 'sslh-main.o' failed
make[4]: *** [sslh-main.o] Error 1

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-03 19:21:27 -07:00

61 lines
1.5 KiB
Makefile

#
# Copyright (C) 2009-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=sslh
PKG_VERSION:=v1.18
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://rutschle.net/tech/sslh/
PKG_MD5SUM:=0e3568d5d234516c634d4df156473298
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/sslh
SECTION:=net
CATEGORY:=Network
SUBMENU:=Routing and Redirection
TITLE:=SSL/SSH multiplexer
DEPENDS:=+libconfig +USE_UCLIBC:libpcre +USE_MUSL:libpcre
URL:=http://rutschle.net/tech/sslh.shtml
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
endef
define Package/sslh/conffiles
/etc/config/sslh
/etc/sslh.conf
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
ENABLE_REGEX=1 \
USELIBCONFIG=1 \
USELIBWRAP= \
USELIBPCRE= \
$(if $(CONFIG_USE_GLIBC),USELIBPCRE=,USELIBPCRE=1)\
all
endef
define Package/sslh/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh-fork $(1)/usr/sbin/sslh
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
$(INSTALL_CONF) $(PKG_BUILD_DIR)/basic.cfg $(1)/etc/sslh.conf
endef
$(eval $(call BuildPackage,sslh))