2013-08-28 05:56:11 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# civetweb
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-09-26 01:29:42 +02:00
|
|
|
CIVETWEB_VERSION = v1.11
|
|
|
|
CIVETWEB_SITE = $(call github,civetweb,civetweb,$(CIVETWEB_VERSION))
|
2013-08-28 05:56:11 +02:00
|
|
|
CIVETWEB_LICENSE = MIT
|
|
|
|
CIVETWEB_LICENSE_FILES = LICENSE.md
|
|
|
|
|
2018-09-26 01:29:42 +02:00
|
|
|
CIVETWEB_CONF_OPTS = TARGET_OS=LINUX WITH_IPV6=1 \
|
|
|
|
$(if $(BR2_INSTALL_LIBSTDCPP),WITH_CPP=1)
|
2015-04-27 22:31:00 +02:00
|
|
|
CIVETWEB_COPT = -DHAVE_POSIX_FALLOCATE=0
|
2015-04-27 22:03:12 +02:00
|
|
|
CIVETWEB_LIBS = -lpthread -lm
|
2013-08-28 05:56:11 +02:00
|
|
|
CIVETWEB_SYSCONFDIR = /etc
|
|
|
|
CIVETWEB_HTMLDIR = /var/www
|
2018-09-26 01:29:42 +02:00
|
|
|
CIVETWEB_INSTALL_OPTS = \
|
|
|
|
DOCUMENT_ROOT="$(CIVETWEB_HTMLDIR)" \
|
|
|
|
CONFIG_FILE2="$(CIVETWEB_SYSCONFDIR)/civetweb.conf" \
|
|
|
|
HTMLDIR="$(TARGET_DIR)$(CIVETWEB_HTMLDIR)" \
|
|
|
|
SYSCONFDIR="$(TARGET_DIR)$(CIVETWEB_SYSCONFDIR)"
|
2013-08-28 05:56:11 +02:00
|
|
|
|
2018-12-04 22:15:36 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4),)
|
|
|
|
CIVETWEB_COPT += -DNO_ATOMICS=1
|
|
|
|
endif
|
|
|
|
|
2015-04-27 22:29:05 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CIVETWEB_WITH_LUA),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
CIVETWEB_CONF_OPTS += WITH_LUA=1
|
2015-04-27 22:03:12 +02:00
|
|
|
CIVETWEB_LIBS += -ldl
|
2013-08-28 05:56:11 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
CIVETWEB_COPT += -DNO_SSL_DL
|
2019-04-10 12:37:46 +02:00
|
|
|
CIVETWEB_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
|
2019-04-09 23:10:32 +02:00
|
|
|
CIVETWEB_DEPENDENCIES += openssl host-pkgconf
|
2013-08-28 05:56:11 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
CIVETWEB_COPT += -DNO_SSL
|
2013-08-28 05:56:11 +02:00
|
|
|
endif
|
|
|
|
|
2018-09-26 01:29:42 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CIVETWEB_SERVER),y)
|
|
|
|
CIVETWEB_BUILD_TARGETS += build
|
|
|
|
CIVETWEB_INSTALL_TARGETS += install
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_CIVETWEB_LIB),y)
|
|
|
|
CIVETWEB_INSTALL_STAGING = YES
|
|
|
|
CIVETWEB_INSTALL_TARGETS += install-headers
|
|
|
|
|
|
|
|
ifeq ($(BR2_STATIC_LIBS)$(BR2_STATIC_SHARED_LIBS),y)
|
|
|
|
CIVETWEB_BUILD_TARGETS += lib
|
|
|
|
CIVETWEB_INSTALL_TARGETS += install-lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_SHARED_LIBS)$(BR2_STATIC_SHARED_LIBS),y)
|
|
|
|
CIVETWEB_BUILD_TARGETS += slib
|
|
|
|
CIVETWEB_INSTALL_TARGETS += install-slib
|
|
|
|
CIVETWEB_COPT += -fPIC
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif # BR2_PACKAGE_CIVETWEB_LIB
|
|
|
|
|
2013-08-28 05:56:11 +02:00
|
|
|
define CIVETWEB_BUILD_CMDS
|
2018-09-26 01:29:42 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(CIVETWEB_BUILD_TARGETS) \
|
2014-09-27 21:32:44 +02:00
|
|
|
$(CIVETWEB_CONF_OPTS) \
|
2013-09-24 14:16:17 +02:00
|
|
|
COPT="$(CIVETWEB_COPT)" LIBS="$(CIVETWEB_LIBS)"
|
2013-08-28 05:56:11 +02:00
|
|
|
endef
|
|
|
|
|
2018-09-26 01:29:42 +02:00
|
|
|
define CIVETWEB_INSTALL_STAGING_CMDS
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
|
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(CIVETWEB_INSTALL_TARGETS) \
|
|
|
|
PREFIX="$(STAGING_DIR)/usr" \
|
|
|
|
$(CIVETWEB_INSTALL_OPTS) \
|
|
|
|
$(CIVETWEB_CONF_OPTS) \
|
|
|
|
COPT='$(CIVETWEB_COPT)'
|
|
|
|
endef
|
|
|
|
|
2013-08-28 05:56:11 +02:00
|
|
|
define CIVETWEB_INSTALL_TARGET_CMDS
|
2018-09-26 01:29:42 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/include
|
|
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(CIVETWEB_INSTALL_TARGETS) \
|
2013-08-28 05:56:11 +02:00
|
|
|
PREFIX="$(TARGET_DIR)/usr" \
|
2018-09-26 01:29:42 +02:00
|
|
|
$(CIVETWEB_INSTALL_OPTS) \
|
2014-09-27 21:32:44 +02:00
|
|
|
$(CIVETWEB_CONF_OPTS) \
|
2013-08-28 05:56:11 +02:00
|
|
|
COPT='$(CIVETWEB_COPT)'
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|