uhttpd: fix Makefiles and linking of tls plugin
SVN-Revision: 28769
This commit is contained in:
parent
248ab4ac2f
commit
fcea88e3b5
2 changed files with 12 additions and 7 deletions
|
@ -70,11 +70,13 @@ TLS_LDFLAGS:=
|
||||||
ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_cyassl),)
|
ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_cyassl),)
|
||||||
UHTTPD_TLS:=cyassl
|
UHTTPD_TLS:=cyassl
|
||||||
TLS_CFLAGS:=-I$(STAGING_DIR)/usr/include/cyassl -DTLS_IS_CYASSL
|
TLS_CFLAGS:=-I$(STAGING_DIR)/usr/include/cyassl -DTLS_IS_CYASSL
|
||||||
|
TLS_LDFLAGS:=-lcyassl -lm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_openssl),)
|
ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_openssl),)
|
||||||
UHTTPD_TLS:=openssl
|
UHTTPD_TLS:=openssl
|
||||||
TLS_CFLAGS:=-DTLS_IS_OPENSSL
|
TLS_CFLAGS:=-DTLS_IS_OPENSSL
|
||||||
|
TLS_LDFLAGS:=-lssl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,11 +92,14 @@ endef
|
||||||
|
|
||||||
|
|
||||||
TARGET_CFLAGS += $(TLS_CFLAGS)
|
TARGET_CFLAGS += $(TLS_CFLAGS)
|
||||||
|
TARGET_LDFLAGS += $(TLS_LDFLAGS)
|
||||||
MAKE_VARS += \
|
MAKE_VARS += \
|
||||||
FPIC="$(FPIC)" \
|
FPIC="$(FPIC)" \
|
||||||
LUA_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-lua),1)" \
|
LUA_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-lua),1)" \
|
||||||
TLS_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-tls),1)" \
|
TLS_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-tls),1)" \
|
||||||
UHTTPD_TLS="$(UHTTPD_TLS)"
|
UHTTPD_TLS="$(UHTTPD_TLS)" \
|
||||||
|
TLS_CFLAGS="$(TLS_CFLAGS)" \
|
||||||
|
TLS_LDFLAGS="$(TLS_LDFLAGS)"
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
|
|
@ -4,16 +4,16 @@ TLS_SUPPORT ?= 1
|
||||||
UHTTPD_TLS ?= cyassl
|
UHTTPD_TLS ?= cyassl
|
||||||
|
|
||||||
CFLAGS ?= -I./lua-5.1.4/src $(TLS_CFLAGS) -O0 -ggdb3
|
CFLAGS ?= -I./lua-5.1.4/src $(TLS_CFLAGS) -O0 -ggdb3
|
||||||
LDFLAGS ?= -L./lua-5.1.4/src $(TLS_LDFLAGS)
|
LDFLAGS ?= -L./lua-5.1.4/src
|
||||||
|
|
||||||
CFLAGS += -Wall --std=gnu99
|
CFLAGS += -Wall --std=gnu99
|
||||||
|
|
||||||
ifeq ($(UHTTPD_TLS),openssl)
|
ifeq ($(UHTTPD_TLS),openssl)
|
||||||
TLS_LDFLAGS := -L./openssl-0.9.8m -lssl
|
TLS_LDFLAGS ?= -L./openssl-0.9.8m -lssl
|
||||||
TLS_CFLAGS := -I./openssl-0.9.8m/include -DTLS_IS_OPENSSL
|
TLS_CFLAGS ?= -I./openssl-0.9.8m/include -DTLS_IS_OPENSSL
|
||||||
else
|
else
|
||||||
TLS_LDFLAGS := -L./cyassl-1.4.0/src/.libs -lcyassl
|
TLS_LDFLAGS ?= -L./cyassl-1.4.0/src/.libs -lcyassl
|
||||||
TLS_CFLAGS := -I./cyassl-1.4.0/include -DTLS_IS_CYASSL
|
TLS_CFLAGS ?= -I./cyassl-1.4.0/include -DTLS_IS_CYASSL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJ := uhttpd.o uhttpd-file.o uhttpd-utils.o
|
OBJ := uhttpd.o uhttpd-file.o uhttpd-utils.o
|
||||||
|
@ -62,7 +62,7 @@ ifeq ($(TLS_SUPPORT),1)
|
||||||
|
|
||||||
$(TLSLIB): uhttpd-tls.c
|
$(TLSLIB): uhttpd-tls.c
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $(FPIC) \
|
$(CC) $(CFLAGS) $(LDFLAGS) $(FPIC) \
|
||||||
-shared \
|
-shared $(TLS_LDFLAGS) \
|
||||||
-o $(TLSLIB) uhttpd-tls.c
|
-o $(TLSLIB) uhttpd-tls.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue