blob: 5a1a4434f3990a829fb017fac45510995aff557a [file] [log] [blame]
Ethan Yonker50381972014-02-11 11:44:06 -06001LOCAL_PATH:= $(call my-dir)
2
3# Build static binary
4include $(CLEAR_VARS)
5
6LOCAL_SRC_FILES:= \
7 twrpTarMain.cpp \
8 ../twrp-functions.cpp \
9 ../twrpTar.cpp \
10 ../tarWrite.c \
11 ../twrpDU.cpp
12LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN
13
Xing0af1ac12015-11-27 11:19:37 -080014LOCAL_C_INCLUDES += bionic
15ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
16 LOCAL_C_INCLUDES += external/stlport/stlport
17endif
18
19LOCAL_STATIC_LIBRARIES := libc libtar_static libstdc++
20ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
21 LOCAL_STATIC_LIBRARIES += libstlport_static
22endif
Ethan Yonker50381972014-02-11 11:44:06 -060023
24ifeq ($(TWHAVE_SELINUX), true)
25 LOCAL_C_INCLUDES += external/libselinux/include
26 LOCAL_STATIC_LIBRARIES += libselinux
Matt Mower666d1512015-11-11 23:10:50 -060027 LOCAL_CFLAGS += -DHAVE_SELINUX
Ethan Yonker50381972014-02-11 11:44:06 -060028endif
29ifneq ($(RECOVERY_SDCARD_ON_DATA),)
30 LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
31endif
32ifeq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
33 LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS
34else
35 LOCAL_STATIC_LIBRARIES += libopenaes_static
36endif
37
38LOCAL_MODULE:= twrpTar_static
39LOCAL_FORCE_STATIC_EXECUTABLE := true
Ethan Yonker960f0302014-12-21 21:54:00 -060040LOCAL_MODULE_TAGS:= optional
Ethan Yonker50381972014-02-11 11:44:06 -060041LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
42LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
43include $(BUILD_EXECUTABLE)
44
45
46# Build shared binary
47include $(CLEAR_VARS)
48
49LOCAL_SRC_FILES:= \
50 twrpTarMain.cpp \
51 ../twrp-functions.cpp \
52 ../twrpTar.cpp \
53 ../tarWrite.c \
54 ../twrpDU.cpp
55LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN
56
57LOCAL_C_INCLUDES += bionic external/stlport/stlport
58LOCAL_SHARED_LIBRARIES := libc libtar libstlport libstdc++
59
60ifeq ($(TWHAVE_SELINUX), true)
61 LOCAL_C_INCLUDES += external/libselinux/include
62 LOCAL_SHARED_LIBRARIES += libselinux
Matt Mower666d1512015-11-11 23:10:50 -060063 LOCAL_CFLAGS += -DHAVE_SELINUX
Ethan Yonker50381972014-02-11 11:44:06 -060064endif
65ifneq ($(RECOVERY_SDCARD_ON_DATA),)
66 LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
67endif
68ifeq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
69 LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS
70else
71 LOCAL_SHARED_LIBRARIES += libopenaes
72endif
73
74LOCAL_MODULE:= twrpTar
Ethan Yonker960f0302014-12-21 21:54:00 -060075LOCAL_MODULE_TAGS:= optional
Ethan Yonker50381972014-02-11 11:44:06 -060076LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
77LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
78include $(BUILD_EXECUTABLE)