blob: 80ded7519171f6fc71ec88a1075cb9c74aa5156a [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 \
bigbiff7df87472022-09-24 16:45:03 -040026 android.security.apc-ndk \
27 android.system.keystore2-V1-ndk \
28 android.security.authorization-ndk \
29 android.security.maintenance-ndk \
30 libkeystoreinfo \
bigbiffdf53b6c2022-01-17 19:31:52 -050031 libselinux \
32 libbinder_ndk \
33 libext4_utils \
34 libbase \
35 libcrypto \
36 libcutils \
37 libf2fs_sparseblock \
38 libkeymaster_messages \
39 libkeymint_support \
bigbiffdf53b6c2022-01-17 19:31:52 -050040 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)