source: branches/packages_10.03.1/libs/libiconv/Makefile @ 30005

Last change on this file since 30005 was 30005, checked in by jow, 4 years ago

[packages] libiconv: implement UTF-8 encode/decode
Implement own UTF-8 encoding and decoding routines as uClibc's wchar procedures are mostly stubbed.
Add Latin9 (ISO-8859-15) decoding support while we're at it.

File size: 2.0 KB
Line 
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
11include $(TOPDIR)/rules.mk
12
13PKG_NAME:=libiconv
14PKG_RELEASE:=6
15
16include $(INCLUDE_DIR)/package.mk
17include $(INCLUDE_DIR)/host-build.mk
18
19define Package/libiconv
20  SECTION:=libs
21  CATEGORY:=Libraries
22  TITLE:=Tiny drop-in replacement for the GNU Character set conversion library
23endef
24
25define Build/Prepare
26        $(INSTALL_DIR) $(PKG_BUILD_DIR)
27        $(CP) ./src/* $(PKG_BUILD_DIR)/
28endef     
29
30define Build/Configure
31endef
32
33define Build/Compile
34        $(TARGET_CC) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC)
35        $(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
36endef
37
38define Build/InstallDev
39        $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/lib
40        $(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/libiconv-stub/lib/
41
42        $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/include
43        $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/lib/libiconv-stub/include/
44
45        $(INSTALL_DIR) $(1)/usr/share/aclocal
46        $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
47endef
48
49define Package/libiconv/install
50        $(INSTALL_DIR) $(1)/tmp
51        touch $(1)/tmp/.libiconv-placeholder
52endef
53
54define Host/Prepare
55        mkdir -p $(HOST_BUILD_DIR)
56endef
57
58define Host/Configure
59
60endef
61
62define Host/Compile
63        $(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC
64        ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o
65endef
66
67define Host/Install
68        $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib
69        $(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR_HOST)/lib/
70
71        $(INSTALL_DIR) $(STAGING_DIR_HOST)/include
72        $(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR_HOST)/include/
73
74        $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal
75        $(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOST)/share/aclocal/
76endef
77
78$(eval $(call HostBuild))
79$(eval $(call BuildPackage,libiconv))
Note: See TracBrowser for help on using the repository browser.