]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Improved the Android build instructions
authorDan Fandrich <dan@coneharvesters.com>
Fri, 9 Jul 2010 23:11:36 +0000 (16:11 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 9 Jul 2010 23:11:36 +0000 (16:11 -0700)
Android.mk
docs/INSTALL

index b93481a85bf54c714200dfc0e713889997032a98..f93f2b59c53d344bc680ac13d99961b2b1efeef2 100644 (file)
 # shown. Now, from the external/curl/ directory, run curl's normal configure
 # command with flags that match what Android itself uses. This will mean
 # putting the compiler directory into the PATH, putting the -I, -isystem and
-# -D options into CPPFLAGS, putting the -m, -f, -O and -nostdlib options into
-# CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the path
-# to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o. Remember
-# that the paths must be absolute since you will not be running configure from
-# the same directory as the Android make.  The normal cross-compiler options
-# must also be set.
+# -D options into CPPFLAGS, putting the -W, -m, -f, -O and -nostdlib options
+# into CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the
+# path to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o.
+# Remember that the paths must be absolute since you will not be running
+# configure from the same directory as the Android make.  The normal
+# cross-compiler options must also be set. Note that the -c, -o, -MD and
+# similar flags must not be set.
+#
+# To see all the LIBS options, you'll need to do the "showcommands" trick on an
+# executable that's already buildable and watch what flags Android uses to link
+# it (dhcpcd is a good choice to watch). You'll also want to add -L options to
+# LIBS that point to the out/.../obj/lib/ and out/.../obj/system/lib/
+# directories so that additional libraries can be found and used by curl.
 #
 # The end result will be a configure command that looks something like this
-# (the environment variable A is set to the Android root path):
+# (the environment variable A is set to the Android root path which makes the
+# command shorter):
 #
 #  A=`realpath ../..` && \
 #  PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
@@ -34,7 +42,7 @@
 # into the right place (see the note about this below).
 #
 # Dan Fandrich
-# May 2010
+# July 2010
 
 LOCAL_PATH:= $(call my-dir)
 
@@ -91,7 +99,7 @@ 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 link
-# against a dynamic library
+# if libcurl is changed to be a dynamic library
 LOCAL_CFLAGS += $(common_CFLAGS)
 
 include $(BUILD_EXECUTABLE)
index 575d00012ed16d52abc5c4ef7dda920cca27821a..8bf455967227e67028a7f35fd825b1fed6464195 100644 (file)
@@ -779,6 +779,11 @@ VxWorks
    To clean the build results type 'make -f ./Makefile.vxworks clean'.
 
 
+Android
+=======
+   See the build notes in the Android.mk file.
+
+
 CROSS COMPILE
 =============
    (This section was graciously brought to us by Jim Duey, with additions by
@@ -908,7 +913,7 @@ PORTS
         - Alpha OpenVMS V7.1-1H2
         - Alpha Tru64 v5.0 5.1
         - AVR32 Linux
-        - ARM Android 1.5
+        - ARM Android 1.5, 2.1
         - ARM INTEGRITY
         - ARM iPhone OS
         - Cell Linux