--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
add -DXXX to your CFLAGS in your makefile may helo you.--Chen
Hi Nalin,
ndk-build isn't a script so much as just a set of Makefiles. However,
it does require obeying it's own conventions.
Now the RTFM part I'm afraid:
android-ndk/docs/ANDROID-MK.html around line 481:
LOCAL_CFLAGS
~line 505:
my question below:-On Sun, Feb 17, 2013 at 12:46 PM, Chen Yang <sunse...@gmail.com> wrote:Thanks Chen-- but that I know ; like gcc -D[conditional-define]
add -DXXX to your CFLAGS in your makefile may helo you.--ChenHowever, if we are doing a Android build using the ndk-build script-- does ndk-build script also have a similar command-line option ?
Asking because I have a project around a big SDK-- which has a complicated build script-- which repeatedly calls ndk-build-- am looking to edit that build script-- such that each call to ndk-build includes the conditional defines I want-- possibly picked from that build script's command-line.Thanks again and Best Regards,Nalin
--
On Sun, Feb 17, 2013 at 8:20 AM, Nalin Savara <nsn...@gmail.com> wrote:
my question below:-On Sun, Feb 17, 2013 at 12:46 PM, Chen Yang <sunse...@gmail.com> wrote:Thanks Chen-- but that I know ; like gcc -D[conditional-define]
add -DXXX to your CFLAGS in your makefile may helo you.--ChenHowever, if we are doing a Android build using the ndk-build script-- does ndk-build script also have a similar command-line option ?Not exactly a command-line option, but since ndk-build is a wrapper around GNU Make, you can force the definition of some variables as in:ndk-build APP_CFLAGS=-DXXXXWhich will override any definition of APP_CFLAGS you have in your Application.mk.
I would still not recommend doing though because it can lead to incorrect builds when you switch between such definitions. The reason for this is that the build system will not detect that compiler flags changed between invocations, so you will end up linking "stale" object files into the final binaries.When you manually modify Application.mk instead, the build system detects it and rebuilds everything appropriately.
Does this mean:-(a) that the variables defined with"ndk-build APP_CFLAGS=-DXXXX"-->> will be defined in addition to variables defined in Application.mk ?
OR(b) does this mean that only the variables we define on command-line will exist-- and others originally defined using APP_CFLAGS in Application.mk will now be left underined unless defined from command-line ?
(c) if (b)-->>> then is there a option which can define the cmd-line vars in addition to those already defined in Application.mk ?Something like Qt's libs += libxx ?
Do let me know...Thanks again for sharing and Best Regards,NalinI would still not recommend doing though because it can lead to incorrect builds when you switch between such definitions. The reason for this is that the build system will not detect that compiler flags changed between invocations, so you will end up linking "stale" object files into the final binaries.When you manually modify Application.mk instead, the build system detects it and rebuilds everything appropriately.<snip>
--