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