do not include stlport headers unless link to it
Change-Id: I8344d270ddb601694b5fef0fa7b22ea437030728
diff --git a/twrpTarMain/Android.mk b/twrpTarMain/Android.mk
index 5f15bf0..5a1a443 100644
--- a/twrpTarMain/Android.mk
+++ b/twrpTarMain/Android.mk
@@ -11,8 +11,15 @@
../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