aboutsummaryrefslogtreecommitdiff
path: root/build/android/libiconv_android_mk.patch
blob: 9eb7a1915fd3fc2bce8200220f85cd8a6fdb833e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From fe27aae178d65b06d5f4104158343b0d2d33e3f0 Mon Sep 17 00:00:00 2001
From: Pierre Zurek <pierrezurek@gmail.com>
Date: Sat, 2 Apr 2011 23:11:57 +0200
Subject: [PATCH] Added Android.mk.

This makefile first executes the configure script, that will
generate the config.h files necessary to build iconv.
---
 Android.mk | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Android.mk

diff --git a/jni/Android.mk b/jni/Android.mk
new file mode 100644
index 0000000..799b22d
--- /dev/null
+++ b/jni/Android.mk
@@ -0,0 +1,32 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_SRC_FILES := src/lib/iconv.c \
+                   src/libcharset/lib/localcharset.c \
+                   src/lib/relocatable.c
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/include \
+                    $(LOCAL_PATH)/src/libcharset \
+                    $(LOCAL_PATH)/src/libcharset/include
+
+LOCAL_CFLAGS := \
+    -DLIBDIR="\"c\"" \
+    -D_ANDROID \
+    -DBUILDING_LIBCHARSET \
+    -DBUILDING_LIBICONV \
+    -DBUILDING_LIBICONV \
+    -DIN_LIBRARY
+
+LOCAL_MODULE:= iconv
+
+$(info Configuring iconv...)
+COMMAND := $(shell \
+           export PATH=$(TOOLCHAIN_INSTALL_DIR)/bin:$$PATH; \
+           cd $(LOCAL_PATH); \
+           make distclean; \
+           ./configure --host="arm-linux-androideabi")
+$(info iconv configured.)
+
+include $(BUILD_STATIC_LIBRARY)
+