From 42fc4496541acdcaf49bcdf3fcffe247be985fe0 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 29 Jun 2011 13:16:16 +0200 Subject: hw-config-defs.h: Remove from source tree + auto-generate This patch modifies the emulator's build system to place the auto-generated file android/avd/hw-config-defs.h into the build directory. Before that, the file was placed in the source tree. + Fix the standalone build system to properly deal with generated source file dependencies + LOCAL_C_INCLUDES Change-Id: I4e77cd20bf4ca21f79d5dd19f27724bd8be53a79 --- android/build/binary.make | 5 +++++ android/build/definitions.make | 13 +++++++++++++ 2 files changed, 18 insertions(+) (limited to 'android/build') diff --git a/android/build/binary.make b/android/build/binary.make index f6542dc..3bc4fe9 100644 --- a/android/build/binary.make +++ b/android/build/binary.make @@ -25,6 +25,8 @@ LOCAL_GENERATED_C_SOURCES := $(filter %.c,$(LOCAL_GENERATED_SOURCES)) LOCAL_CXX_SOURCES := $(filter %$(LOCAL_CPP_EXTENSION),$(LOCAL_SRC_FILES) $(LOCAL_GENERATED_SOURCES)) LOCAL_OBJC_SOURCES := $(filter %.m,$(LOCAL_SRC_FILES) $(LOCAL_GENERATED_SOURCES)) +LOCAL_CFLAGS := $(strip $(patsubst %,-I%,$(LOCAL_C_INCLUDES)) $(LOCAL_CFLAGS)) + $(foreach src,$(LOCAL_C_SOURCES), \ $(eval $(call compile-c-source,$(src))) \ ) @@ -41,4 +43,7 @@ $(foreach src,$(LOCAL_OBJC_SOURCES), \ $(eval $(call compile-objc-source,$(src))) \ ) +# Ensure that we build all generated sources before the objects +$(LOCAL_OBJECTS): | $(LOCAL_GENERATED_SOURCES) + CLEAN_OBJS_DIRS += $(LOCAL_OBJS_DIR) diff --git a/android/build/definitions.make b/android/build/definitions.make index e31131b..ddf9150 100644 --- a/android/build/definitions.make +++ b/android/build/definitions.make @@ -13,6 +13,19 @@ # limitations under the License. # +# this turns off the suffix rules built into make +.SUFFIXES: + +# this turns off the RCS / SCCS implicit rules of GNU Make +% : RCS/%,v +% : RCS/% +% : %,v +% : s.% +% : SCCS/s.% + +# If a rule fails, delete $@. +.DELETE_ON_ERROR: + # shared definitions ifeq ($(strip $(SHOW)),) define pretty -- cgit v1.1