blob: fac377258ea9caae118c3498d7d2b93ff4bae0ad [file] [log] [blame]
bigbiff bigbiff9c754052013-01-09 09:09:08 -05001LOCAL_PATH := $(call my-dir)
2
Ethan Yonkerccb0cf72014-02-11 11:42:45 -06003# Build shared library
bigbiff bigbiff9c754052013-01-09 09:09:08 -05004include $(CLEAR_VARS)
5
6LOCAL_MODULE := libtar
bigbiffd58ba182020-03-23 10:02:29 -04007LOCAL_MODULE_TAGS := optional
Ethan Yonker8d039f72017-02-03 14:26:15 -06008LOCAL_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 bigbiff9c754052013-01-09 09:09:08 -05009LOCAL_C_INCLUDES += $(LOCAL_PATH) \
Ethan Yonker79f88bd2016-12-09 14:52:12 -060010 external/zlib
bigbiff bigbiff9c754052013-01-09 09:09:08 -050011LOCAL_SHARED_LIBRARIES += libz libc
12
Matt Mower87413642017-01-17 21:14:46 -060013LOCAL_C_INCLUDES += external/libselinux/include
14LOCAL_SHARED_LIBRARIES += libselinux
Ethan Yonker79f88bd2016-12-09 14:52:12 -060015
16ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
bigbiffdf53b6c2022-01-17 19:31:52 -050017 LOCAL_STATIC_LIBRARIES += libvold libscrypt_static
18 LOCAL_SHARED_LIBRARIES += \
19 android.hardware.boot@1.0 \
20 android.hardware.confirmationui@1.0 \
21 android.hardware.gatekeeper@1.0 \
22 android.hardware.keymaster@3.0 \
23 android.hardware.keymaster@4.0 \
24 android.hardware.keymaster@4.1 \
25 android.hardware.weaver@1.0 \
26 android.security.apc-ndk_platform \
27 android.system.keystore2-V1-ndk_platform \
28 android.security.authorization-ndk_platform \
29 android.security.maintenance-ndk_platform \
30 libselinux \
31 libbinder_ndk \
32 libext4_utils \
33 libbase \
34 libcrypto \
35 libcutils \
36 libf2fs_sparseblock \
37 libkeymaster_messages \
38 libkeymint_support \
39 libkeystoreinfo \
40 libkeystore-attestation-application-id \
41 libhardware \
42 libprotobuf-cpp-lite \
43 libfscrypt \
44 libhidlbase \
45 libutils \
46 libbinder \
47 libfs_mgr \
48 libkeymaster4support \
49 libkeymaster4_1support \
50 libf2fs_sparseblock \
51 libkeyutils \
52 liblog \
53 libhwbinder \
54 libchrome \
55 libbootloader_message \
56 libgatekeeper_aidl
57
bigbiffa957f072021-03-07 18:20:29 -050058 LOCAL_CFLAGS += -DUSE_FSCRYPT
bigbiff2e344ab2021-05-07 10:41:55 -040059 ifeq ($(TW_USE_FSCRYPT_POLICY), 1)
60 LOCAL_CFLAGS += -DUSE_FSCRYPT_POLICY_V1
61 else
62 LOCAL_CFLAGS += -DUSE_FSCRYPT_POLICY_V2
63 endif
bigbiffdf53b6c2022-01-17 19:31:52 -050064 LOCAL_C_INCLUDES += system/vold
Vojtech Bocek25fd68d2013-08-27 03:10:10 +020065endif
66
DarthJabba9247c68b2020-10-11 16:47:56 +010067ifeq ($(TW_LIBTAR_DEBUG),true)
68 LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG
69endif
70
bigbiff bigbiff9c754052013-01-09 09:09:08 -050071include $(BUILD_SHARED_LIBRARY)
72
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060073# Build static library
74include $(CLEAR_VARS)
75
76LOCAL_MODULE := libtar_static
bigbiffd58ba182020-03-23 10:02:29 -040077LOCAL_MODULE_TAGS := optional
Ethan Yonker8d039f72017-02-03 14:26:15 -060078LOCAL_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 Yonkerccb0cf72014-02-11 11:42:45 -060079LOCAL_C_INCLUDES += $(LOCAL_PATH) \
Ethan Yonker79f88bd2016-12-09 14:52:12 -060080 external/zlib
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060081LOCAL_STATIC_LIBRARIES += libz libc
82
Matt Mower87413642017-01-17 21:14:46 -060083LOCAL_C_INCLUDES += external/libselinux/include
84LOCAL_STATIC_LIBRARIES += libselinux
Ethan Yonker79f88bd2016-12-09 14:52:12 -060085
86ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
bigbiffa957f072021-03-07 18:20:29 -050087 LOCAL_CFLAGS += -DUSE_FSCRYPT
bigbiffdf53b6c2022-01-17 19:31:52 -050088 LOCAL_C_INCLUDES += system/vold
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060089endif
90
DarthJabba9247c68b2020-10-11 16:47:56 +010091ifeq ($(TW_LIBTAR_DEBUG),true)
92 LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG
93endif
94
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060095include $(BUILD_STATIC_LIBRARY)