From 7b67f645b929ae90c74b45bf89e5a2fe0bde2074 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 20 Feb 2011 03:26:48 +0000 Subject: [PATCH] libiconv: add support for using the stub on the host SVN-Revision: 25600 --- libs/libiconv/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/libs/libiconv/Makefile b/libs/libiconv/Makefile index bc91c75fa..e935a4f08 100644 --- a/libs/libiconv/Makefile +++ b/libs/libiconv/Makefile @@ -14,6 +14,7 @@ PKG_NAME:=libiconv PKG_RELEASE:=4 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk define Package/libiconv SECTION:=libs @@ -50,4 +51,29 @@ define Package/libiconv/install touch $(1)/tmp/.libiconv-placeholder endef +define Host/Prepare + mkdir -p $(HOST_BUILD_DIR) +endef + +define Host/Configure + +endef + +define Host/Compile + $(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC + ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib + $(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR_HOST)/lib/ + + $(INSTALL_DIR) $(STAGING_DIR_HOST)/include + $(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR_HOST)/include/ + + $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal + $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(STAGING_DIR_HOST)/share/aclocal/ +endef + +$(eval $(call HostBuild)) $(eval $(call BuildPackage,libiconv)) -- 2.30.2