Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 1 | # |
| 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 Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 16 | |
Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 18 | |
Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 19 | # |
| 20 | # To update: |
| 21 | # |
| 22 | |
| 23 | # git remote add libxml2 git://git.gnome.org/libxml2 |
| 24 | # git fetch libxml2 |
| 25 | # git merge libxml2/master |
| 26 | # mm -j32 |
| 27 | # # (Make any necessary Android.mk changes and test the new libxml2.) |
| 28 | # git push aosp HEAD:master # Push directly, avoiding gerrit. |
| 29 | # git push aosp HEAD:refs/for/master # Push to gerrit. |
| 30 | # |
| 31 | # # Now commit any necessary Android.mk changes like normal: |
| 32 | # repo start post-sync . |
| 33 | # git commit -a |
| 34 | # |
| 35 | |
| 36 | # This comes from the automake-generated Makefile. |
Elliott Hughes | 7ce9181 | 2014-10-30 15:52:49 -0700 | [diff] [blame] | 37 | # We deliberately exclude nanoftp.c and nanohttp.c, the trio library, and zlib. |
Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 38 | common_SRC_FILES := SAX.c entities.c encoding.c error.c \ |
| 39 | parserInternals.c parser.c tree.c hash.c list.c xmlIO.c \ |
| 40 | xmlmemory.c uri.c valid.c xlink.c HTMLparser.c HTMLtree.c \ |
| 41 | debugXML.c xpath.c xpointer.c xinclude.c \ |
| 42 | DOCBparser.c catalog.c globals.c threads.c c14n.c xmlstring.c \ |
| 43 | buf.c xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ |
| 44 | xmlreader.c relaxng.c dict.c SAX2.c \ |
| 45 | xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c xmlmodule.c \ |
Elliott Hughes | 7ce9181 | 2014-10-30 15:52:49 -0700 | [diff] [blame] | 46 | schematron.c |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 47 | |
Narayan Kamath | 4ea9a23 | 2014-12-08 13:00:36 +0000 | [diff] [blame] | 48 | common_C_INCLUDES += $(LOCAL_PATH)/include |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 49 | |
Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 50 | common_CFLAGS += -DLIBXML_THREAD_ENABLED=1 |
Kristian Monsen | 2d3ad03 | 2014-01-02 15:50:08 -0800 | [diff] [blame] | 51 | |
Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 52 | common_CFLAGS += \ |
| 53 | -Wno-missing-field-initializers \ |
| 54 | -Wno-self-assign \ |
| 55 | -Wno-sign-compare \ |
| 56 | -Wno-tautological-pointer-compare \ |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 57 | |
Tom Cherry | aed4aad | 2015-04-10 15:20:10 -0700 | [diff] [blame] | 58 | # Static library |
| 59 | #======================================================= |
| 60 | |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 61 | include $(CLEAR_VARS) |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 62 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
Elliott Hughes | 12fecf7 | 2014-07-09 16:04:29 -0700 | [diff] [blame] | 63 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
Tom Cherry | aed4aad | 2015-04-10 15:20:10 -0700 | [diff] [blame] | 64 | LOCAL_CFLAGS += $(common_CFLAGS) -fvisibility=hidden |
Narayan Kamath | 4ea9a23 | 2014-12-08 13:00:36 +0000 | [diff] [blame] | 65 | LOCAL_SHARED_LIBRARIES += libicuuc |
Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 66 | LOCAL_MODULE := libxml2 |
| 67 | LOCAL_CLANG := true |
| 68 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 69 | include $(BUILD_STATIC_LIBRARY) |
| 70 | |
Tom Cherry | aed4aad | 2015-04-10 15:20:10 -0700 | [diff] [blame] | 71 | # Shared library |
| 72 | #======================================================= |
| 73 | |
| 74 | include $(CLEAR_VARS) |
| 75 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 76 | LOCAL_C_INCLUDES := $(common_C_INCLUDES) |
| 77 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 78 | LOCAL_SHARED_LIBRARIES := libicuuc |
| 79 | LOCAL_MODULE:= libxml2 |
| 80 | LOCAL_CLANG := true |
| 81 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| 82 | include $(BUILD_SHARED_LIBRARY) |
| 83 | |
| 84 | # For the host |
| 85 | # ======================================================== |
| 86 | |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 87 | include $(CLEAR_VARS) |
| 88 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
Elliott Hughes | 12fecf7 | 2014-07-09 16:04:29 -0700 | [diff] [blame] | 89 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
Tom Cherry | aed4aad | 2015-04-10 15:20:10 -0700 | [diff] [blame] | 90 | LOCAL_CFLAGS += $(common_CFLAGS) -fvisibility=hidden |
Narayan Kamath | 4ea9a23 | 2014-12-08 13:00:36 +0000 | [diff] [blame] | 91 | LOCAL_SHARED_LIBRARIES += libicuuc-host |
Elliott Hughes | 733bcbd | 2014-10-30 14:09:05 -0700 | [diff] [blame] | 92 | LOCAL_MODULE := libxml2 |
| 93 | LOCAL_CLANG := true |
| 94 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 95 | include $(BUILD_HOST_STATIC_LIBRARY) |