blob: 9a35c7ba9471233660bb3d9401b7a5d8997a3e65 [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)
bigbiff7ba75002020-04-11 20:47:09 -040017 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 Bocek25fd68d2013-08-27 03:10:10 +020026endif
27
bigbiff bigbiff9c754052013-01-09 09:09:08 -050028include $(BUILD_SHARED_LIBRARY)
29
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060030# Build static library
31include $(CLEAR_VARS)
32
33LOCAL_MODULE := libtar_static
bigbiffd58ba182020-03-23 10:02:29 -040034LOCAL_MODULE_TAGS := optional
Ethan Yonker8d039f72017-02-03 14:26:15 -060035LOCAL_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 -060036LOCAL_C_INCLUDES += $(LOCAL_PATH) \
Ethan Yonker79f88bd2016-12-09 14:52:12 -060037 external/zlib
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060038LOCAL_STATIC_LIBRARIES += libz libc
39
Matt Mower87413642017-01-17 21:14:46 -060040LOCAL_C_INCLUDES += external/libselinux/include
41LOCAL_STATIC_LIBRARIES += libselinux
Ethan Yonker79f88bd2016-12-09 14:52:12 -060042
43ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
bigbiff7ba75002020-04-11 20:47:09 -040044 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 Yonkerccb0cf72014-02-11 11:42:45 -060053endif
54
55include $(BUILD_STATIC_LIBRARY)