diff options
Diffstat (limited to 'Android.mk')
-rw-r--r-- | Android.mk | 26 |
1 files changed, 17 insertions, 9 deletions
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) |