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