blob: 883f898c15a4a2a267fd0238c8a0ad946b460e87 [file] [log] [blame]
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -08001LOCAL_PATH:= $(call my-dir)
2
3# We need to build this for both the device (as a shared library)
4# and the host (as a static library for tools to use).
5
6common_SRC_FILES := \
7 SAX.c \
8 entities.c \
9 encoding.c \
10 error.c \
11 parserInternals.c \
12 parser.c \
13 tree.c \
14 hash.c \
15 list.c \
16 xmlIO.c \
17 xmlmemory.c \
18 uri.c \
19 valid.c \
20 xlink.c \
21 HTMLparser.c \
22 HTMLtree.c \
23 debugXML.c \
24 xpath.c \
25 xpointer.c \
26 xinclude.c \
27 nanohttp.c \
28 nanoftp.c \
29 DOCBparser.c \
30 catalog.c \
31 globals.c \
32 threads.c \
33 c14n.c \
34 xmlstring.c \
35 xmlregexp.c \
36 xmlschemas.c \
37 xmlschemastypes.c \
38 xmlunicode.c \
39 xmlreader.c \
40 relaxng.c \
41 dict.c \
42 SAX2.c \
43 legacy.c \
44 chvalid.c \
45 pattern.c \
46 xmlsave.c \
47 xmlmodule.c \
48 xmlwriter.c \
Selim Gurun94442ad2013-12-30 18:23:42 -080049 schematron.c \
50 buf.c \
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080051
52common_C_INCLUDES += \
Elliott Hughes12fecf72014-07-09 16:04:29 -070053 $(LOCAL_PATH)/include \
54 external/icu/icu4c/source/common \
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080055
Selim Gurunbfe103c2014-01-03 20:26:02 +000056# Turn off warnings to prevent log message spam
57# These warnings are not disabled because they are not supported by gcc 4.2.1
58# which is used by darwin.
59# -Wno-enum-compare
60# -Wno-array-bounds
61
Kristian Monsen2d3ad032014-01-02 15:50:08 -080062DISABLED_WARNING_FLAGS := \
Kristian Monsen2d3ad032014-01-02 15:50:08 -080063 -Wno-format \
64 -Wno-pointer-sign \
65 -Wno-sign-compare
66
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080067# For the device
68# =====================================================
69
70include $(CLEAR_VARS)
71
72LOCAL_SRC_FILES := $(common_SRC_FILES)
Elliott Hughes12fecf72014-07-09 16:04:29 -070073LOCAL_C_INCLUDES += $(common_C_INCLUDES)
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080074LOCAL_SHARED_LIBRARIES += $(common_SHARED_LIBRARIES)
75LOCAL_CFLAGS += -fvisibility=hidden
Kristian Monsen2d3ad032014-01-02 15:50:08 -080076LOCAL_CFLAGS += $(DISABLED_WARNING_FLAGS)
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080077
Jouni Malinen94572532014-01-06 15:58:34 -080078LOCAL_CFLAGS += -DLIBXML_SCHEMAS_ENABLED
79LOCAL_CFLAGS += -DLIBXML_REGEXP_ENABLED
80LOCAL_CFLAGS += -DLIBXML_AUTOMATA_ENABLED
81LOCAL_CFLAGS += -DLIBXML_PATTERN_ENABLED
82LOCAL_CFLAGS += -DLIBXML_UNICODE_ENABLED
83LOCAL_CFLAGS += -DLIBXML_VALID_ENABLED
84
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080085LOCAL_MODULE:= libxml2
86
87include $(BUILD_STATIC_LIBRARY)
88
89
90# For the host
91# ========================================================
92
93include $(CLEAR_VARS)
94LOCAL_SRC_FILES := $(common_SRC_FILES)
Elliott Hughes12fecf72014-07-09 16:04:29 -070095LOCAL_C_INCLUDES += $(common_C_INCLUDES)
Kristian Monsen2d3ad032014-01-02 15:50:08 -080096LOCAL_CFLAGS += $(DISABLED_WARNING_FLAGS)
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080097LOCAL_SHARED_LIBRARIES += $(common_SHARED_LIBRARIES)
98LOCAL_MODULE:= libxml2
99include $(BUILD_HOST_STATIC_LIBRARY)