Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | |
| 3 | # Build static binary |
| 4 | include $(CLEAR_VARS) |
| 5 | |
| 6 | LOCAL_SRC_FILES:= \ |
| 7 | twrpTarMain.cpp \ |
| 8 | ../twrp-functions.cpp \ |
| 9 | ../twrpTar.cpp \ |
| 10 | ../tarWrite.c \ |
| 11 | ../twrpDU.cpp |
| 12 | LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN |
| 13 | |
Xing | 0af1ac1 | 2015-11-27 11:19:37 -0800 | [diff] [blame] | 14 | LOCAL_C_INCLUDES += bionic |
| 15 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
| 16 | LOCAL_C_INCLUDES += external/stlport/stlport |
| 17 | endif |
| 18 | |
| 19 | LOCAL_STATIC_LIBRARIES := libc libtar_static libstdc++ |
| 20 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
| 21 | LOCAL_STATIC_LIBRARIES += libstlport_static |
| 22 | endif |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 23 | |
| 24 | ifeq ($(TWHAVE_SELINUX), true) |
| 25 | LOCAL_C_INCLUDES += external/libselinux/include |
| 26 | LOCAL_STATIC_LIBRARIES += libselinux |
Matt Mower | 666d151 | 2015-11-11 23:10:50 -0600 | [diff] [blame] | 27 | LOCAL_CFLAGS += -DHAVE_SELINUX |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 28 | endif |
| 29 | ifneq ($(RECOVERY_SDCARD_ON_DATA),) |
| 30 | LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA |
| 31 | endif |
| 32 | ifeq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true) |
| 33 | LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS |
| 34 | else |
| 35 | LOCAL_STATIC_LIBRARIES += libopenaes_static |
| 36 | endif |
| 37 | |
| 38 | LOCAL_MODULE:= twrpTar_static |
| 39 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Ethan Yonker | 960f030 | 2014-12-21 21:54:00 -0600 | [diff] [blame] | 40 | LOCAL_MODULE_TAGS:= optional |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 41 | LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES |
| 42 | LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities |
| 43 | include $(BUILD_EXECUTABLE) |
| 44 | |
| 45 | |
| 46 | # Build shared binary |
| 47 | include $(CLEAR_VARS) |
| 48 | |
| 49 | LOCAL_SRC_FILES:= \ |
| 50 | twrpTarMain.cpp \ |
| 51 | ../twrp-functions.cpp \ |
| 52 | ../twrpTar.cpp \ |
| 53 | ../tarWrite.c \ |
| 54 | ../twrpDU.cpp |
| 55 | LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN |
| 56 | |
| 57 | LOCAL_C_INCLUDES += bionic external/stlport/stlport |
| 58 | LOCAL_SHARED_LIBRARIES := libc libtar libstlport libstdc++ |
| 59 | |
| 60 | ifeq ($(TWHAVE_SELINUX), true) |
| 61 | LOCAL_C_INCLUDES += external/libselinux/include |
| 62 | LOCAL_SHARED_LIBRARIES += libselinux |
Matt Mower | 666d151 | 2015-11-11 23:10:50 -0600 | [diff] [blame] | 63 | LOCAL_CFLAGS += -DHAVE_SELINUX |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 64 | endif |
| 65 | ifneq ($(RECOVERY_SDCARD_ON_DATA),) |
| 66 | LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA |
| 67 | endif |
| 68 | ifeq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true) |
| 69 | LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS |
| 70 | else |
| 71 | LOCAL_SHARED_LIBRARIES += libopenaes |
| 72 | endif |
| 73 | |
| 74 | LOCAL_MODULE:= twrpTar |
Ethan Yonker | 960f030 | 2014-12-21 21:54:00 -0600 | [diff] [blame] | 75 | LOCAL_MODULE_TAGS:= optional |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 76 | LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES |
| 77 | LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities |
| 78 | include $(BUILD_EXECUTABLE) |