I am trying to compile one of the modules in my Android ndk project with g ++, although all the sources are in C. My eyes are annoyed by make system warnings:
`C:/NVPACK/android-ndk-r8d/build/core/build-binary.mk:348: warning: overriding commands for target 'obj/local/armeabi/objs/xxx/yyy.o'` `C:/NVPACK/android-ndk-r8d/build/core/build-binary.mk:345: warning: ignoring old commands for target 'obj/local/armeabi/objs/xxx/yyy.o'`
And these warning pairs will be printed in the same way as the source files and therefore the objects.
I tried declaring LOCAL_SRC_FILES with all the various options.
`LOCAL_SRC_FILES := $(LOCAL_PATH)/Directory/source.c $(notdir $(wildcard $(LOCAL_PATH)/*.c)) $(notdir $(wildcard $(LOCAL_PATH)/Directory/*.c)) $(addprefix DirectoryPrefix/,$(notdir $(wildcard $(LOCAL_PATH)/Directory/*.c)))`
Nevertheless, the warning remains.
Make document says:
warning: overriding commands for target xxx '' warning: ignoring old commands for target xxx '' GNU make allows you to specify commands only once for each target (except for rules with two colons). If you give commands for a target that has already been defined for the presence of commands, this warning is issued, and the second set of commands overwrites the first set.
But I canβt understand how this is related at all. After working with it, it seems that creating g ++ - compiling abstracts of C files makes this warning. Therefore, indicating this statement:
LOCAL_CPP_EXTENSION := .c
This creates C files with g ++. Because when compiling with gcc, no warnings are printed.
source share