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 | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 17 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 29; echo $$?),0) |
| 18 | LOCAL_SHARED_LIBRARIES += libtwrpfscrypt |
| 19 | LOCAL_CFLAGS += -DUSE_FSCRYPT |
| 20 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/fscrypt |
| 21 | else |
| 22 | LOCAL_SHARED_LIBRARIES += libe4crypt |
| 23 | LOCAL_CFLAGS += -DHAVE_EXT4_CRYPT |
| 24 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/ext4crypt |
| 25 | endif |
Vojtech Bocek | 25fd68d | 2013-08-27 03:10:10 +0200 | [diff] [blame] | 26 | endif |
| 27 | |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 28 | include $(BUILD_SHARED_LIBRARY) |
| 29 | |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 30 | # Build static library |
| 31 | include $(CLEAR_VARS) |
| 32 | |
| 33 | LOCAL_MODULE := libtar_static |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 34 | LOCAL_MODULE_TAGS := optional |
Ethan Yonker | 8d039f7 | 2017-02-03 14:26:15 -0600 | [diff] [blame] | 35 | 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] | 36 | LOCAL_C_INCLUDES += $(LOCAL_PATH) \ |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 37 | external/zlib |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 38 | LOCAL_STATIC_LIBRARIES += libz libc |
| 39 | |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 40 | LOCAL_C_INCLUDES += external/libselinux/include |
| 41 | LOCAL_STATIC_LIBRARIES += libselinux |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 42 | |
| 43 | ifeq ($(TW_INCLUDE_CRYPTO_FBE), true) |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 44 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 29; echo $$?),0) |
| 45 | LOCAL_SHARED_LIBRARIES += libtwrpfscrypt |
| 46 | LOCAL_CFLAGS += -DUSE_FSCRYPT |
| 47 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/fscrypt |
| 48 | else |
| 49 | LOCAL_SHARED_LIBRARIES += libe4crypt |
| 50 | LOCAL_CFLAGS += -DHAVE_EXT4_CRYPT |
| 51 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/ext4crypt |
| 52 | endif |
Ethan Yonker | ccb0cf7 | 2014-02-11 11:42:45 -0600 | [diff] [blame] | 53 | endif |
| 54 | |
| 55 | include $(BUILD_STATIC_LIBRARY) |