Large example build file to maybe get some ideas:
https://github.com/lukeweber/webrtc-jingle/blob/master/app/jni/Android.mk

I would suggest using:
LOCAL_WHOLE_STATIC_LIBRARIES instead of LOCAL_SHARED_LIBRARY
BUILD_STATIC_LIBRARY instead of BUILD_SHARED_LIBRARY

Luke

On Fri, Jul 20, 2012 at 11:15 PM, Luke Weber <[email protected]> wrote:
> BUILD
>
>
>
>
> ----- Reply message -----
> From: "bob" <[email protected]>
> To: <[email protected]>
> Subject: [android-discuss] Re: Android makefile to generae the static
> executable
> Date: Fri, Jul 20, 2012 22:02
>
>
> These two lines suggest to me that not everything will be statically linked:
>
> include $(BUILD_SHARED_LIBRARY)
>
> LOCAL_SHARED_LIBRARIES := libiw
>
> Plus, why are you building adbd?
>
>
> On Tuesday, July 17, 2012 3:49:44 AM UTC-5, Sam wrote:
>>
>> I am trying to generate the executable something like adbd in /sbin.
>>
>> The executable I wish to have is iwlist with ARM format and the type is
>> static.
>>
>> I added the folder in the AndroidSourceCode/external and execute the "mm"
>> command to compile
>>
>> The following is the Android.mk in my folder
>>
>> LOCAL_PATH := $(call my-dir)
>> ifneq ($(TARGET_SIMULATOR),true)
>> include $(CLEAR_VARS)
>>
>> LOCAL_MODULE := libiw
>>
>> LOCAL_MODULE_TAGS := eng
>>
>> LOCAL_SRC_FILES := iwlib.c
>>
>> LOCAL_C_INCLUDE += LOCAL_PATH
>>
>> LOCAL_PRELINK_MODULE := false
>>
>> include $(BUILD_SHARED_LIBRARY)
>>
>> #================================================
>> include $(CLEAR_VARS)
>> LOCAL_FORCE_STATIC_EXECUTABLE := true
>> LOCAL_MODULE_TAGS := eng
>> LOCAL_SRC_FILES := iwlist.c
>>
>> LOCAL_SHARED_LIBRARIES := libiw
>> LOCAL_MODULE := iwlist
>>
>> include $(BUILD_EXECUTABLE)
>> #================================================
>>
>> endif # !TARGET_SIMULATOR
>>
>> The above make file actually works by generating the iwlist executable
>> with
>>
>>  iwlist: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically
>> linked (uses
>>  shared libs), stripped
>>
>> However, I am looking for the "statically linked" and I was thinking
>> "LOCAL_FORCE_STATIC_EXECUTABLE := true" this line should help me make this
>> executable statically.
>>
>> Unfortunately, it doesnt.
>>
>> Kindly instruct me if you know how to do it.
>>
>> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-discuss/-/8Fwj1Xj1vxUJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/android-discuss?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en.

Reply via email to