blob: 1972573bb0d4a9e3fb75db1409b79cfc610cd1f7 [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
7LOCAL_MODULE_TAGS := eng
8LOCAL_MODULES_TAGS = optional
9LOCAL_CFLAGS =
10LOCAL_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
11LOCAL_C_INCLUDES += $(LOCAL_PATH) \
12 external/zlib
13LOCAL_SHARED_LIBRARIES += libz libc
14
Dees Troy4bf3b0d2013-09-11 19:12:49 +000015ifeq ($(TWHAVE_SELINUX), true)
Vojtech Bocek25fd68d2013-08-27 03:10:10 +020016 LOCAL_C_INCLUDES += external/libselinux/include
17 LOCAL_SHARED_LIBRARIES += libselinux
18 LOCAL_CFLAGS += -DHAVE_SELINUX
19endif
20
bigbiff bigbiff9c754052013-01-09 09:09:08 -050021include $(BUILD_SHARED_LIBRARY)
22
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060023# Build static library
24include $(CLEAR_VARS)
25
26LOCAL_MODULE := libtar_static
27LOCAL_MODULE_TAGS := eng
28LOCAL_MODULES_TAGS = optional
29LOCAL_CFLAGS =
30LOCAL_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
31LOCAL_C_INCLUDES += $(LOCAL_PATH) \
32 external/zlib
33LOCAL_STATIC_LIBRARIES += libz libc
34
35ifeq ($(TWHAVE_SELINUX), true)
36 LOCAL_C_INCLUDES += external/libselinux/include
37 LOCAL_STATIC_LIBRARIES += libselinux
38 LOCAL_CFLAGS += -DHAVE_SELINUX
39endif
40
41include $(BUILD_STATIC_LIBRARY)