resolved conflicts for merge of 1a4527ce to lmp-dev-plus-aosp

Change-Id: Iee4e93e3a2b049ec5f13166dbbffdd77b301fe5c
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index dbaa4b8..771e286 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -1,5 +1,6 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 
 LOCAL_CFLAGS += -DHAVE_CONFIG_H -DKHTML_NO_EXCEPTIONS -DGKWQ_NO_JAVA
 LOCAL_CFLAGS += -DNO_SUPPORT_JS_BINDING -DQT_NO_WHEELEVENT -DKHTML_NO_XBL
@@ -255,9 +256,10 @@
 
 LOCAL_SHARED_LIBRARIES += \
 	libdl
+
 # we need to access the private Bionic header
 # <bionic_tls.h> in com_google_android_gles_jni_GLImpl.cpp
-LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../bionic/libc/private
+LOCAL_C_INCLUDES += bionic/libc/private
 
 ifeq ($(WITH_MALLOC_LEAK_CHECK),true)
 	LOCAL_CFLAGS += -DMALLOC_LEAK_CHECK
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 49560ff..36185ae 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -1,5 +1,6 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 
 # Only build libhwui when USE_OPENGL_RENDERER is
 # defined in the current device/board configuration
@@ -82,15 +83,14 @@
 	LOCAL_MODULE := libhwui
 	LOCAL_MODULE_TAGS := optional
 
-	include external/stlport/libstlport.mk
-
 	ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT))
 		LOCAL_CFLAGS += -DANDROID_ENABLE_RENDERSCRIPT
 		LOCAL_SHARED_LIBRARIES += libRS libRScpp
 		LOCAL_C_INCLUDES += \
 			$(intermediates) \
 			frameworks/rs/cpp \
-			frameworks/rs
+			frameworks/rs \
+
 	endif
 
 	ifndef HWUI_COMPILE_SYMBOLS
@@ -104,6 +104,7 @@
 	# Defaults for ATRACE_TAG and LOG_TAG for libhwui
 	LOCAL_CFLAGS += -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\"
 
+	include external/stlport/libstlport.mk
 	include $(BUILD_SHARED_LIBRARY)
 
 	include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/libs/usb/tests/AccessoryChat/accessorychat/Android.mk b/libs/usb/tests/AccessoryChat/accessorychat/Android.mk
index 3e07155..51f2111 100644
--- a/libs/usb/tests/AccessoryChat/accessorychat/Android.mk
+++ b/libs/usb/tests/AccessoryChat/accessorychat/Android.mk
@@ -4,6 +4,7 @@
 ifeq ($(HOST_OS),linux)
 
 include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 
 LOCAL_MODULE_TAGS := optional
 
@@ -21,6 +22,7 @@
 
 # Build for device
 include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 
 LOCAL_MODULE_TAGS := optional
 
diff --git a/media/mca/filterfw/Android.mk b/media/mca/filterfw/Android.mk
index 2a9448d..a5b4b27 100644
--- a/media/mca/filterfw/Android.mk
+++ b/media/mca/filterfw/Android.mk
@@ -22,6 +22,7 @@
 # Build main libfilterfw
 
 include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 
 LOCAL_MODULE := libfilterfw
 
@@ -30,7 +31,7 @@
 LOCAL_WHOLE_STATIC_LIBRARIES := libfilterfw_jni \
                                 libfilterfw_native
 
-LOCAL_SHARED_LIBRARIES := libstlport \
+LOCAL_SHARED_LIBRARIES := \
                           libGLESv2 \
                           libEGL \
                           libgui \
@@ -48,4 +49,5 @@
 # part of a system image.
 LOCAL_PRELINK_MODULE := false
 
+include external/stlport/libstlport.mk
 include $(BUILD_SHARED_LIBRARY)
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk
index 2cbabe1..71d5539 100644
--- a/tools/aapt/Android.mk
+++ b/tools/aapt/Android.mk
@@ -152,8 +152,6 @@
 LOCAL_SRC_FILES := $(aaptSources) $(aaptMain)
 LOCAL_C_INCLUDES += \
     $(aaptCIncludes) \
-    bionic \
-    external/stlport/stlport
 
 LOCAL_SHARED_LIBRARIES := \
     libandroidfw \
@@ -164,12 +162,12 @@
     libz
 
 LOCAL_STATIC_LIBRARIES := \
-    libstlport_static \
     libexpat_static
 
 LOCAL_CFLAGS += $(aaptCFlags)
 LOCAL_CPPFLAGS += -Wno-non-virtual-dtor
 
+include external/stlport/libstlport.mk
 include $(BUILD_EXECUTABLE)
 
 endif # Not SDK_ONLY