blob: 838b44175491a2d8d66d81c546e0d49b2974c31a [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
8LOCAL_CFLAGS :=
bigbiff bigbiff9c754052013-01-09 09:09:08 -05009LOCAL_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
10LOCAL_C_INCLUDES += $(LOCAL_PATH) \
11 external/zlib
12LOCAL_SHARED_LIBRARIES += libz libc
13
Dees Troy4bf3b0d2013-09-11 19:12:49 +000014ifeq ($(TWHAVE_SELINUX), true)
Vojtech Bocek25fd68d2013-08-27 03:10:10 +020015 LOCAL_C_INCLUDES += external/libselinux/include
16 LOCAL_SHARED_LIBRARIES += libselinux
17 LOCAL_CFLAGS += -DHAVE_SELINUX
18endif
19
bigbiff bigbiff9c754052013-01-09 09:09:08 -050020include $(BUILD_SHARED_LIBRARY)
21
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060022# Build static library
23include $(CLEAR_VARS)
24
25LOCAL_MODULE := libtar_static
Matt Mowerdb220442014-10-31 22:43:59 -050026LOCAL_MODULE_TAGS := eng optional
Ethan Yonkerccb0cf72014-02-11 11:42:45 -060027LOCAL_CFLAGS =
28LOCAL_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
29LOCAL_C_INCLUDES += $(LOCAL_PATH) \
30 external/zlib
31LOCAL_STATIC_LIBRARIES += libz libc
32
33ifeq ($(TWHAVE_SELINUX), true)
34 LOCAL_C_INCLUDES += external/libselinux/include
35 LOCAL_STATIC_LIBRARIES += libselinux
36 LOCAL_CFLAGS += -DHAVE_SELINUX
37endif
38
39include $(BUILD_STATIC_LIBRARY)