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