aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/bzip2
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-07-24 09:11:29 +0000
committerJohn Crispin <john@openwrt.org>2015-07-24 09:11:29 +0000
commit6edf2f62c89a8a3960d41104223d7c728a210fdd (patch)
tree995425c6f5524043d5c2c46bf898ad2e35560cc3 /package/utils/bzip2
parenta77a9f520c64853f80d90933a0a61557d6261092 (diff)
downloadupstream-6edf2f62c89a8a3960d41104223d7c728a210fdd.tar.gz
upstream-6edf2f62c89a8a3960d41104223d7c728a210fdd.tar.bz2
upstream-6edf2f62c89a8a3960d41104223d7c728a210fdd.zip
bzip2: add host build
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 46470
Diffstat (limited to 'package/utils/bzip2')
-rw-r--r--package/utils/bzip2/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/package/utils/bzip2/Makefile b/package/utils/bzip2/Makefile
index 493ccc9317..e1c7b97ffc 100644
--- a/package/utils/bzip2/Makefile
+++ b/package/utils/bzip2/Makefile
@@ -19,6 +19,7 @@ PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=BZIP2
PKG_LICENSE_FILES:=LICENSE
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/bzip2/Default
@@ -83,5 +84,25 @@ define Package/bzip2/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bzip2-shared $(1)/usr/bin/bzip2
endef
+HOST_CFLAGS += \
+ $(FPIC) \
+ $(HOST_LDFLAGS)
+
+HOST_MAKE_FLAGS+= \
+ -f Makefile-libbz2_so \
+ CFLAGS="$(HOST_CFLAGS)" \
+ all
+
+HOST_CONFIGURE_ARGS+= \
+ --prefix=$(STAGING_DIR_HOST)
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
+ $(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR_HOST)/usr/ install
+# $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2
+endef
+
+$(eval $(call HostBuild))
+
$(eval $(call BuildPackage,libbz2))
$(eval $(call BuildPackage,bzip2))