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