diff options
Diffstat (limited to 'android/build')
-rw-r--r-- | android/build/binary.make | 5 | ||||
-rw-r--r-- | android/build/common.sh | 4 | ||||
-rw-r--r-- | android/build/definitions.make | 13 |
3 files changed, 20 insertions, 2 deletions
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/common.sh b/android/build/common.sh index 050fd90..de4e3c1 100644 --- a/android/build/common.sh +++ b/android/build/common.sh @@ -457,11 +457,11 @@ check_android_build () unset ANDROID_TOP IN_ANDROID_BUILD=no - if [ -z "$ANDROID_PRODUCT_OUT" ] ; then + if [ -z "$ANDROID_BUILD_TOP" ] ; then return ; fi - ANDROID_TOP=`cd $ANDROID_PRODUCT_OUT/../../../.. && pwd` + ANDROID_TOP=$ANDROID_BUILD_TOP log "ANDROID_TOP found at $ANDROID_TOP" # $ANDROID_TOP/config/envsetup.make is for the old tree layout # $ANDROID_TOP/build/envsetup.sh is for the new one 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 |