diff options
author | Ian Rogers <irogers@google.com> | 2014-11-06 13:27:43 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-11-06 13:27:43 -0800 |
commit | 2be7786b9847861862c60eaf85c610823fdf2da9 (patch) | |
tree | f73bb49ff5629026fc6a1a0e764d2b1b551be431 | |
parent | 686a0c4db5e90b811b1fbe1dba3638522ef4b7a1 (diff) | |
download | frameworks_av-2be7786b9847861862c60eaf85c610823fdf2da9.zip frameworks_av-2be7786b9847861862c60eaf85c610823fdf2da9.tar.gz frameworks_av-2be7786b9847861862c60eaf85c610823fdf2da9.tar.bz2 |
Fix definining of ANDROID_SMP.
If TARGET_CPU_SMP is undefined, such as in SDK builds, then the condition as
written before could cause SMP memory barriers to be missing.
Also, add a dependency for Android.mk so that changes to it cause
recompilation.
Change-Id: I63ac0dc4342a39b9355fce2b2200016244cffc4a
-rw-r--r-- | media/libmedia/Android.mk | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk index 1e322f9..4dc97e1 100644 --- a/media/libmedia/Android.mk +++ b/media/libmedia/Android.mk @@ -59,7 +59,18 @@ LOCAL_SRC_FILES:= \ LOCAL_SRC_FILES += ../libnbaio/roundup.c # for <cutils/atomic-inline.h> -LOCAL_CFLAGS += -DANDROID_SMP=$(if $(findstring true,$(TARGET_CPU_SMP)),1,0) +ifeq ($(TARGET_CPU_SMP),true) + LOCAL_CFLAGS += -DANDROID_SMP=1 +else + ifeq ($(TARGET_CPU_SMP),false) + LOCAL_CFLAGS += -DANDROID_SMP=0 + else + $(warning TARGET_CPU_SMP should be (true|false), found $(TARGET_CPU_SMP)) + # Make sure we emit barriers for the worst case. + LOCAL_CFLAGS += -DANDROID_SMP=1 + endif +endif + LOCAL_SRC_FILES += SingleStateQueue.cpp LOCAL_CFLAGS += -DSINGLE_STATE_QUEUE_INSTANTIATIONS='"SingleStateQueueInstantiations.cpp"' # Consider a separate a library for SingleStateQueueInstantiations. @@ -73,6 +84,8 @@ LOCAL_WHOLE_STATIC_LIBRARY := libmedia_helper LOCAL_MODULE:= libmedia +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk + LOCAL_C_INCLUDES := \ $(call include-path-for, graphics corecg) \ $(TOP)/frameworks/native/include/media/openmax \ |