aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2009-06-02 19:02:02 +0000
committerDan Fandrich <dan@coneharvesters.com>2009-06-02 19:02:02 +0000
commite1270928a3cfec93627154018235480b77b9b1fa (patch)
tree8408b218bcbd1d45f57888ef668e13c38cc48f3b
parent6fce5b54a8286f5844336a756bdfb3601195c62e (diff)
Created a basic Android make file for curl and libcurl. A config.h
is also needed before curl can be built in Android, but it's not clear what the best way is to provide one.
-rw-r--r--Android.mk50
-rw-r--r--CHANGES7
2 files changed, 57 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 000000000..7ed3b0967
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,50 @@
+# Google Android makefile for curl and libcurl
+# Place the curl source (including this makefile) into external/curl/ in the
+# Android source tree. Then build them with 'make curl' or just 'make libcurl'
+# from the Android root.
+#
+# Note: you must first create a config.h file by running configure in the
+# Android environment. I haven't found an easy way to do this yet. If there is
+# no easy way, a static config-android.h may need to be created and checked in
+# to the libcurl source tree.
+#
+# Dan Fandrich
+# June 2009
+
+LOCAL_PATH:= $(call my-dir)
+
+common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
+
+#########################
+# Build the libcurl library
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/lib/Makefile.inc
+LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
+LOCAL_CFLAGS += $(common_CFLAGS)
+
+LOCAL_MODULE:= libcurl
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+#########################
+# Build the curl binary
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/src/Makefile.inc
+LOCAL_SRC_FILES := $(addprefix src/,$(CURL_SOURCES))
+
+LOCAL_MODULE := curl
+LOCAL_STATIC_LIBRARIES := libcurl
+LOCAL_SYSTEM_SHARED_LIBRARIES := libc
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
+
+# This will also need to include $(CURLX_ONES) in order to correctly build
+# a dynamic library
+LOCAL_CFLAGS += $(common_CFLAGS)
+
+include $(BUILD_EXECUTABLE)
+
diff --git a/CHANGES b/CHANGES
index 1b6388189..461049a1f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,13 @@
Changelog
+Daniel Fandrich (2 June 2009)
+- Checked in a Google Android make file. To use it, you must first
+ create a config.h file by running configure in the Android environment,
+ which doesn't seem to be easy to do. If no easy way can be found, a
+ static config-android.h may need to be created and checked in to the
+ libcurl source tree.
+
Daniel Stenberg (1 June 2009)
- Claes Jakobsson fixed the configure script to better find and use NSS
without pkg-config.