summaryrefslogtreecommitdiffstats
path: root/libtar/Android.mk
blob: 838b44175491a2d8d66d81c546e0d49b2974c31a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
LOCAL_PATH := $(call my-dir)

# Build shared library
include $(CLEAR_VARS)

LOCAL_MODULE := libtar
LOCAL_MODULE_TAGS := eng optional
LOCAL_CFLAGS :=
LOCAL_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
LOCAL_C_INCLUDES += $(LOCAL_PATH) \
					external/zlib
LOCAL_SHARED_LIBRARIES += libz libc

ifeq ($(TWHAVE_SELINUX), true)
	LOCAL_C_INCLUDES += external/libselinux/include
	LOCAL_SHARED_LIBRARIES += libselinux
	LOCAL_CFLAGS += -DHAVE_SELINUX
endif

include $(BUILD_SHARED_LIBRARY)

# Build static library
include $(CLEAR_VARS)

LOCAL_MODULE := libtar_static
LOCAL_MODULE_TAGS := eng optional
LOCAL_CFLAGS = 
LOCAL_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
LOCAL_C_INCLUDES += $(LOCAL_PATH) \
					external/zlib
LOCAL_STATIC_LIBRARIES += libz libc

ifeq ($(TWHAVE_SELINUX), true)
	LOCAL_C_INCLUDES += external/libselinux/include
	LOCAL_STATIC_LIBRARIES += libselinux
	LOCAL_CFLAGS += -DHAVE_SELINUX
endif

include $(BUILD_STATIC_LIBRARY)