blob: c1ae8bb46e233a80238beeae59438427c25d7cc4 [file] [log] [blame]
Elliott Hughes733bcbd2014-10-30 14:09:05 -07001#
2# Copyright (C) 2014 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080016
Elliott Hughes733bcbd2014-10-30 14:09:05 -070017LOCAL_PATH := $(call my-dir)
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080018
Elliott Hughes733bcbd2014-10-30 14:09:05 -070019#
20# To update:
21#
22
Xin Libb8dcf92016-07-21 13:46:24 -070023# git merge aosp/upstream-master
Elliott Hughes733bcbd2014-10-30 14:09:05 -070024# mm -j32
25# # (Make any necessary Android.mk changes and test the new libxml2.)
26# git push aosp HEAD:master # Push directly, avoiding gerrit.
27# git push aosp HEAD:refs/for/master # Push to gerrit.
28#
29# # Now commit any necessary Android.mk changes like normal:
30# repo start post-sync .
31# git commit -a
32#
33
34# This comes from the automake-generated Makefile.
Elliott Hughes7ce91812014-10-30 15:52:49 -070035# We deliberately exclude nanoftp.c and nanohttp.c, the trio library, and zlib.
Elliott Hughes733bcbd2014-10-30 14:09:05 -070036common_SRC_FILES := SAX.c entities.c encoding.c error.c \
37 parserInternals.c parser.c tree.c hash.c list.c xmlIO.c \
Sergio Giro7e012e92016-04-13 14:26:17 +010038 xmlmemory.c uri.c valid.c xlink.c \
Elliott Hughes733bcbd2014-10-30 14:09:05 -070039 debugXML.c xpath.c xpointer.c xinclude.c \
40 DOCBparser.c catalog.c globals.c threads.c c14n.c xmlstring.c \
41 buf.c xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
42 xmlreader.c relaxng.c dict.c SAX2.c \
43 xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c xmlmodule.c \
Elliott Hughes7ce91812014-10-30 15:52:49 -070044 schematron.c
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080045
Narayan Kamath4ea9a232014-12-08 13:00:36 +000046common_C_INCLUDES += $(LOCAL_PATH)/include
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080047
Elliott Hughes733bcbd2014-10-30 14:09:05 -070048common_CFLAGS += -DLIBXML_THREAD_ENABLED=1
Kristian Monsen2d3ad032014-01-02 15:50:08 -080049
Elliott Hughes733bcbd2014-10-30 14:09:05 -070050common_CFLAGS += \
51 -Wno-missing-field-initializers \
52 -Wno-self-assign \
53 -Wno-sign-compare \
54 -Wno-tautological-pointer-compare \
Elliott Hugheseaaf5ed2016-01-21 14:47:25 -080055 -Wno-unused-parameter \
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080056
Tom Cherryaed4aad2015-04-10 15:20:10 -070057# Static library
58#=======================================================
59
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080060include $(CLEAR_VARS)
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080061LOCAL_SRC_FILES := $(common_SRC_FILES)
Elliott Hughes12fecf72014-07-09 16:04:29 -070062LOCAL_C_INCLUDES += $(common_C_INCLUDES)
Tom Cherryaed4aad2015-04-10 15:20:10 -070063LOCAL_CFLAGS += $(common_CFLAGS) -fvisibility=hidden
Narayan Kamath4ea9a232014-12-08 13:00:36 +000064LOCAL_SHARED_LIBRARIES += libicuuc
Elliott Hughes733bcbd2014-10-30 14:09:05 -070065LOCAL_MODULE := libxml2
66LOCAL_CLANG := true
67LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080068include $(BUILD_STATIC_LIBRARY)
69
Tom Cherryaed4aad2015-04-10 15:20:10 -070070# Shared library
71#=======================================================
72
73include $(CLEAR_VARS)
74LOCAL_SRC_FILES := $(common_SRC_FILES)
75LOCAL_C_INCLUDES := $(common_C_INCLUDES)
76LOCAL_CFLAGS += $(common_CFLAGS)
77LOCAL_SHARED_LIBRARIES := libicuuc
78LOCAL_MODULE:= libxml2
79LOCAL_CLANG := true
80LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
81include $(BUILD_SHARED_LIBRARY)
82
83# For the host
84# ========================================================
85
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080086include $(CLEAR_VARS)
87LOCAL_SRC_FILES := $(common_SRC_FILES)
Elliott Hughes12fecf72014-07-09 16:04:29 -070088LOCAL_C_INCLUDES += $(common_C_INCLUDES)
Tom Cherryaed4aad2015-04-10 15:20:10 -070089LOCAL_CFLAGS += $(common_CFLAGS) -fvisibility=hidden
Dan Willemsen440b0b32016-09-12 14:34:38 -070090LOCAL_SHARED_LIBRARIES += libicuuc
Elliott Hughes733bcbd2014-10-30 14:09:05 -070091LOCAL_MODULE := libxml2
92LOCAL_CLANG := true
93LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
The Android Open Source Projectab4e2e92009-03-03 19:30:06 -080094include $(BUILD_HOST_STATIC_LIBRARY)