I am working on an Android.mk file in which different CPPFLAGS are needed for one module for one of the files; namely, it needs to enable -frtti, and others need Android -fno-rtti by default.
The obvious solution was the target variables , but, oddly enough, they do not seem to affect compilation, even with some game play, to ensure that the values must be fixed on the right time.
Here is an excerpt from my Android.mk (names changed to protect me):
LOCAL_MODULE := foo_bar
LOCAL_SRC_FILES := \
foo_bar.cpp \
foo_baz.cpp
my_intermediates:= $(local-intermediates-dir)/foo_baz.o
$(my_intermediates): LOCAL_CPPFLAGS := -frtti
I tried just doing foo_baz.o:instead of $ (my_intermediates) and tried to substitute +=for :=no change.
So, is there an Android-specific way to override CPPFLAGS (or CFLAGS) for a specific source file?
( Android Eclair, NDK, . .)