libiconv: add all ASCII aliases
[openwrt/openwrt.git] / package / libs / libiconv / Makefile
1 #
2 # Copyright (C) 2010-2012 OpenWrt.org
3 #
4 # This Makefile and the code shipped in src/ is free software, licensed
5 # under the GNU Lesser General Public License, version 2.1 and later.
6 # See src/COPYING for more information.
7 #
8 # Refer to src/COPYRIGHT for copyright statements on the source files.
9 #
10
11 include $(TOPDIR)/rules.mk
12
13 PKG_NAME:=libiconv
14 PKG_RELEASE:=8
15
16 PKG_LICENSE:=LGPL-2.1
17 PKG_LICENSE_FILES:=LICENSE
18
19 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/host-build.mk
23
24 define Package/libiconv
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Tiny drop-in replacement for the GNU Character set conversion library
28 endef
29
30 define Build/Prepare
31 $(INSTALL_DIR) $(PKG_BUILD_DIR)
32 $(CP) ./src/* $(PKG_BUILD_DIR)/
33 endef
34
35 define Build/Configure
36 endef
37
38 define Build/Compile
39 $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC)
40 $(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
41 endef
42
43 define Build/InstallDev
44 $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/lib
45 $(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/libiconv-stub/lib/
46
47 $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/include
48 $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/lib/libiconv-stub/include/
49
50 $(INSTALL_DIR) $(1)/usr/share/aclocal
51 $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
52 endef
53
54 define Package/libiconv/install
55 $(INSTALL_DIR) $(1)/tmp
56 touch $(1)/tmp/.libiconv-placeholder
57 endef
58
59 define Host/Prepare
60 mkdir -p $(HOST_BUILD_DIR)
61 endef
62
63 define Host/Configure
64
65 endef
66
67 define Host/Compile
68 $(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC
69 ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o
70 endef
71
72 define Host/Install
73 $(INSTALL_DIR) $(STAGING_DIR)/host/lib
74 $(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR)/host/lib/
75
76 $(INSTALL_DIR) $(STAGING_DIR)/host/include
77 $(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR)/host/include/
78
79 $(INSTALL_DIR) $(STAGING_DIR)/host/share/aclocal
80 $(INSTALL_DATA) ./src/m4/* $(STAGING_DIR)/host/share/aclocal/
81 endef
82
83 $(eval $(call HostBuild))
84 $(eval $(call BuildPackage,libiconv))