bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 3 | # Build shared library |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 4 | include $(CLEAR_VARS) |
| 5 | |
| 6 | LOCAL_MODULE := libtar |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 7 | LOCAL_MODULE_TAGS := optional |
Ethan Yonker | 8d039f7 | 2017-02-03 14:26:15 -0600 | [diff] [blame] | 8 | LOCAL_SRC_FILES := append.c block.c decode.c encode.c extract.c handle.c output.c util.c wrapper.c basename.c strmode.c libtar_hash.c libtar_list.c dirname.c android_utils.c |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 9 | LOCAL_C_INCLUDES += $(LOCAL_PATH) \ |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 10 | external/zlib |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 11 | LOCAL_SHARED_LIBRARIES += libz libc |
| 12 | |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 13 | LOCAL_C_INCLUDES += external/libselinux/include |
| 14 | LOCAL_SHARED_LIBRARIES += libselinux |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 15 | |
| 16 | ifeq ($(TW_INCLUDE_CRYPTO_FBE), true) |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 17 | LOCAL_SHARED_LIBRARIES += libtwrpfscrypt |
| 18 | LOCAL_CFLAGS += -DUSE_FSCRYPT |
bigbiff | 2e344ab | 2021-05-07 10:41:55 -0400 | [diff] [blame] | 19 | ifeq ($(TW_USE_FSCRYPT_POLICY), 1) |
| 20 | LOCAL_CFLAGS += -DUSE_FSCRYPT_POLICY_V1 |
| 21 | else |
| 22 | LOCAL_CFLAGS += -DUSE_FSCRYPT_POLICY_V2 |
| 23 | endif |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 24 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/fscrypt |
Vojtech Bocek | 25fd68d | 2013-08-27 03:10:10 +0200 | [diff] [blame] | 25 | endif |
| 26 | |
DarthJabba9 | 247c68b | 2020-10-11 16:47:56 +0100 | [diff] [blame] | 27 | ifeq ($(TW_LIBTAR_DEBUG),true) |
| 28 | LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG |
| 29 | endif |
| 30 | |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 31 | include $(BUILD_SHARED_LIBRARY) |
| 32 | |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 33 | # Build static library |
| 34 | include $(CLEAR_VARS) |
| 35 | |
| 36 | LOCAL_MODULE := libtar_static |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 37 | LOCAL_MODULE_TAGS := optional |
Ethan Yonker | 8d039f7 | 2017-02-03 14:26:15 -0600 | [diff] [blame] | 38 | LOCAL_SRC_FILES := append.c block.c decode.c encode.c extract.c handle.c output.c util.c wrapper.c basename.c strmode.c libtar_hash.c libtar_list.c dirname.c android_utils.c |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 39 | LOCAL_C_INCLUDES += $(LOCAL_PATH) \ |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 40 | external/zlib |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 41 | LOCAL_STATIC_LIBRARIES += libz libc |
| 42 | |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 43 | LOCAL_C_INCLUDES += external/libselinux/include |
| 44 | LOCAL_STATIC_LIBRARIES += libselinux |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 45 | |
| 46 | ifeq ($(TW_INCLUDE_CRYPTO_FBE), true) |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 47 | LOCAL_SHARED_LIBRARIES += libtwrpfscrypt |
| 48 | LOCAL_CFLAGS += -DUSE_FSCRYPT |
| 49 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/fscrypt |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 50 | endif |
| 51 | |
DarthJabba9 | 247c68b | 2020-10-11 16:47:56 +0100 | [diff] [blame] | 52 | ifeq ($(TW_LIBTAR_DEBUG),true) |
| 53 | LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG |
| 54 | endif |
| 55 | |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 56 | include $(BUILD_STATIC_LIBRARY) |