aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-02-17 10:49:14 +0100
committerJo-Philipp Wich <jo@mein.io>2017-02-19 19:08:46 +0100
commit84ceca514841dd6d4705dc27d2104ee0aa18b9e1 (patch)
tree96f6021b934212201e60a0da26ec6ae0ee745e0c /package/libs
parent08f9eb795463edd626c36ef78e43c3d73d515f78 (diff)
downloadupstream-84ceca514841dd6d4705dc27d2104ee0aa18b9e1.tar.gz
upstream-84ceca514841dd6d4705dc27d2104ee0aa18b9e1.tar.bz2
upstream-84ceca514841dd6d4705dc27d2104ee0aa18b9e1.zip
libubox: add host build
Our opkg fork requires libubox to build, so add a host build for it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/libs')
-rw-r--r--package/libs/libubox/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index 7fe9138d64..e756467030 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -18,6 +18,7 @@ PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_BUILD_DEPENDS:=lua
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libubox
@@ -90,8 +91,21 @@ define Package/libubox-lua/install
$(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
endef
+
+CMAKE_HOST_OPTIONS += \
+ -DBUILD_LUA=OFF \
+ -DBUILD_EXAMPLES=OFF \
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/include/libubox
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/*.h $(STAGING_DIR_HOST)/include/libubox/
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/libubox.{a,so} $(STAGING_DIR_HOST)/lib/
+endef
+
$(eval $(call BuildPackage,libubox))
$(eval $(call BuildPackage,libblobmsg-json))
$(eval $(call BuildPackage,jshn))
$(eval $(call BuildPackage,libjson-script))
$(eval $(call BuildPackage,libubox-lua))
+$(eval $(call HostBuild))