From 93a4147f127f62ff50c86da81eb8cc45befcc318 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 20 May 2009 18:37:31 +0200 Subject: [PATCH] This fixes the build to always define the ANDROID macro, and remove an empty -I from the compiler options. The latter had the effect of removing the benefit of optimization settings, i.e. a typical compiler command would look like: .... -Isources/ -I -O2 -g The "-I -O2" was interpreted literally as "search in '-O2' directory, and the optimization was never set to 2 (or 0 in case of debug mode). --- ndk/build/core/build-binary.mk | 4 ++++ ndk/build/core/definitions.mk | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ndk/build/core/build-binary.mk b/ndk/build/core/build-binary.mk index 6566fec39..1446a7db6 100644 --- a/ndk/build/core/build-binary.mk +++ b/ndk/build/core/build-binary.mk @@ -29,6 +29,10 @@ include $(BUILD_SYSTEM)/build-module.mk # list of generated object files LOCAL_OBJECTS := +# always define ANDROID when building binaries +# +LOCAL_CFLAGS := -DANDROID $(LOCAL_CFLAGS) + # # Add the default system shared libraries to the build # diff --git a/ndk/build/core/definitions.mk b/ndk/build/core/definitions.mk index 4135faad3..1a425de84 100644 --- a/ndk/build/core/definitions.mk +++ b/ndk/build/core/definitions.mk @@ -370,7 +370,6 @@ $$(_OBJ): PRIVATE_CC := $$($$(my)CC) $$(_OBJ): PRIVATE_CFLAGS := $$($$(my)CFLAGS) \ $$($$(my)_$(LOCAL_ARM_MODE)_$(LOCAL_BUILD_MODE)_CFLAGS) \ -I$$(LOCAL_PATH) \ - -I$$(OBJS_DIR) \ $$(LOCAL_CFLAGS) \ $$(NDK_APP_CPPFLAGS) \ $$(NDK_APP_CFLAGS) \ @@ -430,7 +429,6 @@ $$(_OBJ): PRIVATE_CXX := $$($$(my)CXX) $$(_OBJ): PRIVATE_CXXFLAGS := $$($$(my)CXXFLAGS) \ $$($$(my)_$(LOCAL_ARM_MODE)_$(LOCAL_BUILD_MODE)_CFLAGS) \ -I$$(LOCAL_PATH) \ - -I$$(OBJS_DIR) \ $$(LOCAL_CFLAGS) \ $$(NDK_APP_CPPFLAGS) \ $$(NDK_APP_CXXFLAGS) \