diff --git a/Android.mk b/Android.mk index b93481a85..f93f2b59c 100644 --- a/Android.mk +++ b/Android.mk @@ -12,15 +12,23 @@ # 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) diff --git a/docs/INSTALL b/docs/INSTALL index 575d00012..8bf455967 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -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