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