kumquat-buildroot/package/civetweb/civetweb.mk
Peter Korsgaard 3cf5b30191 civetweb: fix static linking with openssl
Fixes http://autobuild.buildroot.net/results/acf/acfefc4f0f23ef646094ec427c9502eab7b86736/

Corrects a number of issues with the openssl handling:
 - Libraries have to be listed after the object files using them, so pass
   openssl linker statements in LIBS rather than COPT
 - Openssl support library is libcrypto, not libcrypt
 - Openssl need zlib

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-24 14:16:17 +02:00

57 lines
1.5 KiB
Makefile

################################################################################
#
# civetweb
#
################################################################################
CIVETWEB_VERSION = 1.3
CIVETWEB_SITE = http://github.com/sunsetbrew/civetweb/tarball/v$(CIVETWEB_VERSION)
CIVETWEB_LICENSE = MIT
CIVETWEB_LICENSE_FILES = LICENSE.md
CIVETWEB_CONF_OPT = TARGET_OS=LINUX
CIVETWEB_COPT = $(TARGET_CFLAGS) -DHAVE_POSIX_FALLOCATE=0
CIVETWEB_LIBS = -lpthread -lm -ldl
CIVETWEB_SYSCONFDIR = /etc
CIVETWEB_HTMLDIR = /var/www
ifneq ($(BR2_LARGEFILE),y)
CIVETWEB_COPT += -DSQLITE_DISABLE_LFS
endif
ifeq ($(BR2_INET_IPV6),y)
CIVETWEB_CONF_OPT += WITH_IPV6=1
endif
ifeq ($(BR2_CIVETWEB_WITH_LUA),y)
CIVETWEB_CONF_OPT += WITH_LUA=1
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
CIVETWEB_COPT += -DNO_SSL_DL
CIVETWEB_LIBS += -lssl -lcrypto -lz
CIVETWEB_DEPENDENCIES += openssl
else
CIVETWEB_COPT += -DNO_SSL
endif
define CIVETWEB_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) build \
$(CIVETWEB_CONF_OPT) \
COPT="$(CIVETWEB_COPT)" LIBS="$(CIVETWEB_LIBS)"
endef
define CIVETWEB_INSTALL_TARGET_CMDS
$(MAKE) CC="$(TARGET_CC)" -C $(@D) install \
DOCUMENT_ROOT="$(CIVETWEB_HTMLDIR)" \
CONFIG_FILE2="$(CIVETWEB_SYSCONFDIR)/civetweb.conf" \
HTMLDIR="$(TARGET_DIR)$(CIVETWEB_HTMLDIR)" \
SYSCONFDIR="$(TARGET_DIR)$(CIVETWEB_SYSCONFDIR)" \
PREFIX="$(TARGET_DIR)/usr" \
$(CIVETWEB_CONF_OPT) \
COPT='$(CIVETWEB_COPT)'
endef
$(eval $(generic-package))