summaryrefslogtreecommitdiff
path: root/package/uhttpd/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-05-28 00:52:24 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-05-28 00:52:24 +0000
commit022fa36b40b02248436584cf0f71bb26d79eb644 (patch)
tree8cb1f4d8f1ab4f1aee4538621684a188101c867c /package/uhttpd/Makefile
parent8039a1bbb2056019458b5179108e399d0fcb0622 (diff)
downloadmtk-20170518-022fa36b40b02248436584cf0f71bb26d79eb644.zip
mtk-20170518-022fa36b40b02248436584cf0f71bb26d79eb644.tar.gz
mtk-20170518-022fa36b40b02248436584cf0f71bb26d79eb644.tar.bz2
uhttpd: - rewrite large parts of the server, use uloop event driven structure - support concurrent requests and make the upper limit configurable - implement initial version of HTTP-to-ubus JSON proxy and session.* namespace - add compile time support for debug information - code style changes - bump package revision
SVN-Revision: 31931
Diffstat (limited to 'package/uhttpd/Makefile')
-rw-r--r--package/uhttpd/Makefile55
1 files changed, 41 insertions, 14 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile
index 0331470..f30d6ca 100644
--- a/package/uhttpd/Makefile
+++ b/package/uhttpd/Makefile
@@ -8,14 +8,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
-PKG_RELEASE:=32
+PKG_RELEASE:=33
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_CONFIG_DEPENDS := \
+ CONFIG_PACKAGE_uhttpd_debug \
CONFIG_PACKAGE_uhttpd-mod-lua \
CONFIG_PACKAGE_uhttpd-mod-tls \
CONFIG_PACKAGE_uhttpd-mod-tls_cyassl \
- CONFIG_PACKAGE_uhttpd-mod-tls_openssl
+ CONFIG_PACKAGE_uhttpd-mod-tls_openssl \
+ CONFIG_PACKAGE_uhttpd-mod-ubus
include $(INCLUDE_DIR)/package.mk
@@ -29,7 +31,7 @@ endef
define Package/uhttpd
$(Package/uhttpd/default)
- MENU:=1
+ DEPENDS:=+libubox
endef
define Package/uhttpd/description
@@ -38,6 +40,12 @@ define Package/uhttpd/description
HTTP daemon.
endef
+define Package/uhttpd/config
+ config PACKAGE_uhttpd_debug
+ bool "Build with debug messages"
+ default n
+endef
+
define Package/uhttpd-mod-tls
$(Package/uhttpd/default)
@@ -50,17 +58,17 @@ define Package/uhttpd-mod-tls/description
endef
define Package/uhttpd-mod-tls/config
- choice
- depends on PACKAGE_uhttpd-mod-tls
- prompt "TLS Provider"
- default PACKAGE_uhttpd-mod-tls_cyassl
+ choice
+ depends on PACKAGE_uhttpd-mod-tls
+ prompt "TLS Provider"
+ default PACKAGE_uhttpd-mod-tls_cyassl
- config PACKAGE_uhttpd-mod-tls_cyassl
- bool "CyaSSL"
+ config PACKAGE_uhttpd-mod-tls_cyassl
+ bool "CyaSSL"
- config PACKAGE_uhttpd-mod-tls_openssl
- bool "OpenSSL"
- endchoice
+ config PACKAGE_uhttpd-mod-tls_openssl
+ bool "OpenSSL"
+ endchoice
endef
UHTTPD_TLS:=
@@ -91,12 +99,25 @@ define Package/uhttpd-mod-lua/description
endef
-TARGET_CFLAGS += $(TLS_CFLAGS)
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+define Package/uhttpd-mod-ubus
+ $(Package/uhttpd/default)
+ TITLE+= (ubus plugin)
+ DEPENDS:=uhttpd +libubus +libblobmsg-json
+endef
+
+define Package/uhttpd-mod-ubus/description
+ The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
+ session.* namespace and procedures.
+endef
+
+
+TARGET_CFLAGS += $(TLS_CFLAGS) $(if $(CONFIG_PACKAGE_uhttpd_debug),-DDEBUG) -ggdb3
+TARGET_LDFLAGS += -lubox -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
MAKE_VARS += \
FPIC="$(FPIC)" \
LUA_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-lua),1)" \
TLS_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-tls),1)" \
+ UBUS_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-ubus),1)" \
UHTTPD_TLS="$(UHTTPD_TLS)" \
TLS_CFLAGS="$(TLS_CFLAGS)" \
TLS_LDFLAGS="$(TLS_LDFLAGS)"
@@ -131,7 +152,13 @@ define Package/uhttpd-mod-lua/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
endef
+define Package/uhttpd-mod-ubus/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
+endef
+
$(eval $(call BuildPackage,uhttpd))
$(eval $(call BuildPackage,uhttpd-mod-tls))
$(eval $(call BuildPackage,uhttpd-mod-lua))
+$(eval $(call BuildPackage,uhttpd-mod-ubus))