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 # 16 17 LOCAL_PATH := $(call my-dir) 18 19 # 20 # To update: 21 # 22 23 # git merge aosp/upstream-master 24 # 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. 35 # We deliberately exclude nanoftp.c and nanohttp.c, the trio library, and zlib. 36 common_SRC_FILES := SAX.c entities.c encoding.c error.c \ 37 parserInternals.c parser.c tree.c hash.c list.c xmlIO.c \ 38 xmlmemory.c uri.c valid.c xlink.c \ 39 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 \ 44 schematron.c 45 46 common_C_INCLUDES += $(LOCAL_PATH)/include 47 48 common_CFLAGS += -DLIBXML_THREAD_ENABLED=1 49 50 common_CFLAGS += \ 51 -Wno-missing-field-initializers \ 52 -Wno-self-assign \ 53 -Wno-sign-compare \ 54 -Wno-tautological-pointer-compare \ 55 -Wno-unused-parameter \ 56 57 # Static library 58 #======================================================= 59 60 include $(CLEAR_VARS) 61 LOCAL_SRC_FILES := $(common_SRC_FILES) 62 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 63 LOCAL_CFLAGS += $(common_CFLAGS) -fvisibility=hidden 64 LOCAL_SHARED_LIBRARIES += libicuuc 65 LOCAL_MODULE := libxml2 66 LOCAL_CLANG := true 67 LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk 68 include $(BUILD_STATIC_LIBRARY) 69 70 # Shared library 71 #======================================================= 72 73 include $(CLEAR_VARS) 74 LOCAL_SRC_FILES := $(common_SRC_FILES) 75 LOCAL_C_INCLUDES := $(common_C_INCLUDES) 76 LOCAL_CFLAGS += $(common_CFLAGS) 77 LOCAL_SHARED_LIBRARIES := libicuuc 78 LOCAL_MODULE:= libxml2 79 LOCAL_CLANG := true 80 LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk 81 include $(BUILD_SHARED_LIBRARY) 82 83 # For the host 84 # ======================================================== 85 86 include $(CLEAR_VARS) 87 LOCAL_SRC_FILES := $(common_SRC_FILES) 88 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 89 LOCAL_CFLAGS += $(common_CFLAGS) -fvisibility=hidden 90 LOCAL_SHARED_LIBRARIES += libicuuc 91 LOCAL_MODULE := libxml2 92 LOCAL_CLANG := true 93 LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk 94 include $(BUILD_HOST_STATIC_LIBRARY) 95