blob: 14c19f73fd38decbb876002a1d96d57672969430 [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
Matt Mowerdb220442014-10-31 22:43:59 -05007LOCAL_MODULE_TAGS := eng optional
Ethan Yonker79f88bd2016-12-09 14:52:12 -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
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
Dees Troy4bf3b0d2013-09-11 19:12:49 +000013ifeq ($(TWHAVE_SELINUX), true)
Ethan Yonker79f88bd2016-12-09 14:52:12 -060014 LOCAL_C_INCLUDES += external/libselinux/include
15 LOCAL_SHARED_LIBRARIES += libselinux
16 LOCAL_CFLAGS += -DHAVE_SELINUX
17endif
18
19ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
20 LOCAL_SHARED_LIBRARIES += libe4crypt
21 LOCAL_CFLAGS += -DHAVE_EXT4_CRYPT
22 LOCAL_C_INCLUDES += bootable/recovery/crypto/ext4crypt
Vojtech Bocek25fd68d2013-08-27 03:10:10 +020023endif
24
bigbiff bigbiff9c754052013-01-09 09:09:08 -050025include $(BUILD_SHARED_LIBRARY)
26
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060027# Build static library
28include $(CLEAR_VARS)
29
30LOCAL_MODULE := libtar_static
Matt Mowerdb220442014-10-31 22:43:59 -050031LOCAL_MODULE_TAGS := eng optional
Ethan Yonker79f88bd2016-12-09 14:52:12 -060032LOCAL_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
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060033LOCAL_C_INCLUDES += $(LOCAL_PATH) \
Ethan Yonker79f88bd2016-12-09 14:52:12 -060034 external/zlib
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060035LOCAL_STATIC_LIBRARIES += libz libc
36
37ifeq ($(TWHAVE_SELINUX), true)
Ethan Yonker79f88bd2016-12-09 14:52:12 -060038 LOCAL_C_INCLUDES += external/libselinux/include
39 LOCAL_STATIC_LIBRARIES += libselinux
40 LOCAL_CFLAGS += -DHAVE_SELINUX
41endif
42
43ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
44 LOCAL_SHARED_LIBRARIES += libe4crypt
45 LOCAL_CFLAGS += -DHAVE_EXT4_CRYPT
46 LOCAL_C_INCLUDES += bootable/recovery/crypto/ext4crypt
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060047endif
48
49include $(BUILD_STATIC_LIBRARY)