blob: 7a7d0d5ae9d3dd3b6e2f4ff89251a25a4893912d [file] [log] [blame]
Alexandre Lision950e9d62013-12-02 15:09:01 -05001
2include $(CLEAR_VARS)
3
4MY_LIBEXPAT := libexpat/sources
Emeric Vigier2f625822012-08-06 11:09:52 -04005
6# We need to build this for both the device (as a shared library)
7# and the host (as a static library for tools to use).
8
Alexandre Lision950e9d62013-12-02 15:09:01 -05009common_SRC_FILES := $(MY_LIBEXPAT)/xmlparse.c \
10 $(MY_LIBEXPAT)/xmlrole.c \
11 $(MY_LIBEXPAT)/xmltok.c
Emeric Vigier2f625822012-08-06 11:09:52 -040012
13common_CFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H
14
Alexandre Lision950e9d62013-12-02 15:09:01 -050015common_C_INCLUDES += $(MY_LIBEXPAT)
Emeric Vigier2f625822012-08-06 11:09:52 -040016
17common_COPY_HEADERS_TO := libexpat
Alexandre Lision950e9d62013-12-02 15:09:01 -050018
Emeric Vigier2f625822012-08-06 11:09:52 -040019common_COPY_HEADERS := \
20 lib/expat.h \
21 lib/expat_external.h
22
23# For the device
24# =====================================================
25
26# Device static library
27include $(CLEAR_VARS)
28
29ifeq ($(TARGET_ARCH),arm)
30LOCAL_NDK_VERSION := 4
31LOCAL_SDK_VERSION := 8
32endif
33
34LOCAL_SRC_FILES := $(common_SRC_FILES)
35LOCAL_CFLAGS += $(common_CFLAGS)
36LOCAL_C_INCLUDES += $(common_C_INCLUDES)
37
38LOCAL_MODULE:= libexpat_static
39LOCAL_MODULE_FILENAME := libexpat
40LOCAL_MODULE_TAGS := optional
41
42include $(BUILD_STATIC_LIBRARY)
43
44# Device shared library
45include $(CLEAR_VARS)
46
47ifeq ($(TARGET_ARCH),arm)
48LOCAL_NDK_VERSION := 4
49LOCAL_SDK_VERSION := 8
50endif
51
52LOCAL_SRC_FILES := $(common_SRC_FILES)
53LOCAL_CFLAGS += $(common_CFLAGS)
54LOCAL_C_INCLUDES += $(common_C_INCLUDES)
55
56LOCAL_MODULE:= libexpat_shared
57LOCAL_MODULE_FILENAME := libexpat
58LOCAL_MODULE_TAGS := optional
59LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
60LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
61
Alexandre Lision48ae6af2013-12-03 11:21:52 -050062include $(BUILD_STATIC_LIBRARY)