Skip to content

Commit

Permalink
do not include stlport headers unless link to it
Browse files Browse the repository at this point in the history
Change-Id: I8344d270ddb601694b5fef0fa7b22ea437030728
  • Loading branch information
Xing authored and Dees-Troy committed Dec 23, 2015
1 parent 4251a9b commit 0af1ac1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
7 changes: 5 additions & 2 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ LOCAL_C_INCLUDES += \
system/extras/ext4_utils \
system/core/adb \

LOCAL_C_INCLUDES += bionic external/stlport/stlport external/openssl/include $(LOCAL_PATH)/libmincrypt/includes
LOCAL_C_INCLUDES += bionic external/openssl/include $(LOCAL_PATH)/libmincrypt/includes
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport
endif

LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES :=
Expand All @@ -109,7 +112,7 @@ LOCAL_STATIC_LIBRARIES += libguitwrp
LOCAL_SHARED_LIBRARIES += libz libc libcutils libstdc++ libtar libblkid libminuitwrp libminadbd libmtdutils libminzip libaosprecovery
LOCAL_SHARED_LIBRARIES += libcrecovery

ifeq (,$(filter $(PLATFORM_SDK_VERSION), 23))
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_SHARED_LIBRARIES += libstlport
else
LOCAL_SHARED_LIBRARIES += libc++
Expand Down
6 changes: 5 additions & 1 deletion gui/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ ifeq ($(TW_ROUND_SCREEN), true)
LOCAL_CFLAGS += -DTW_ROUND_SCREEN
endif

LOCAL_C_INCLUDES += bionic external/stlport/stlport system/core/libpixelflinger/include
LOCAL_C_INCLUDES += bionic system/core/libpixelflinger/include
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport
endif

LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"

include $(BUILD_STATIC_LIBRARY)
Expand Down
8 changes: 6 additions & 2 deletions mtp/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libtwrpmtp
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasing
LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic external/stlport/stlport frameworks/base/include system/core/include bionic/libc/private/
LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport
endif

LOCAL_SRC_FILES = \
btree.cpp \
MtpDataPacket.cpp \
Expand All @@ -31,7 +35,7 @@ LOCAL_SRC_FILES = \
node.cpp
LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery

ifeq (,$(filter $(PLATFORM_SDK_VERSION), 23))
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_SHARED_LIBRARIES += libstlport
else
LOCAL_SHARED_LIBRARIES += libc++
Expand Down
11 changes: 9 additions & 2 deletions twrpTarMain/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ LOCAL_SRC_FILES:= \
../twrpDU.cpp
LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN

LOCAL_C_INCLUDES += bionic external/stlport/stlport
LOCAL_STATIC_LIBRARIES := libc libtar_static libstlport_static libstdc++
LOCAL_C_INCLUDES += bionic
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport
endif

LOCAL_STATIC_LIBRARIES := libc libtar_static libstdc++
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_STATIC_LIBRARIES += libstlport_static
endif

ifeq ($(TWHAVE_SELINUX), true)
LOCAL_C_INCLUDES += external/libselinux/include
Expand Down

0 comments on commit 0af1ac1

Please sign in to comment.