• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2011-2014, Intel Corporation
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without modification,
5# are permitted provided that the following conditions are met:
6#
7# 1. Redistributions of source code must retain the above copyright notice, this
8# list of conditions and the following disclaimer.
9#
10# 2. Redistributions in binary form must reproduce the above copyright notice,
11# this list of conditions and the following disclaimer in the documentation and/or
12# other materials provided with the distribution.
13#
14# 3. Neither the name of the copyright holder nor the names of its contributors
15# may be used to endorse or promote products derived from this software without
16# specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29LOCAL_PATH := $(call my-dir)
30
31####################
32# Common definitions
33
34common_src_files := \
35        XmlElement.cpp \
36        XmlSerializingContext.cpp \
37        XmlDocSource.cpp \
38        XmlMemoryDocSink.cpp \
39        XmlMemoryDocSource.cpp \
40        XmlStreamDocSink.cpp \
41
42common_module := libxmlserializer
43
44common_module_tags := optional
45
46# Do not use the '-Werror' flag because of a compilation issue in libxml
47common_cflags := \
48        -Wall \
49        -Wextra \
50        -Wno-unused-parameter
51
52common_c_includes := \
53    external/libxml2/include \
54    external/icu/icu4c/source/common \
55
56common_shared_libraries := libicuuc
57common_static_libraries := libxml2
58
59#############################
60# Target build
61
62include $(CLEAR_VARS)
63
64LOCAL_SRC_FILES := $(common_src_files)
65
66LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
67
68LOCAL_MODULE := $(common_module)
69LOCAL_MODULE_OWNER := intel
70LOCAL_MODULE_TAGS := $(common_module_tags)
71
72LOCAL_CFLAGS := $(common_cflags)
73
74LOCAL_C_INCLUDES := $(common_c_includes)
75
76LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
77LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
78
79LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
80
81include $(BUILD_SHARED_LIBRARY)
82
83##############################
84# Host build
85
86include $(CLEAR_VARS)
87
88LOCAL_SRC_FILES := $(common_src_files)
89
90LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
91
92LOCAL_MODULE := $(common_module)_host
93LOCAL_MODULE_OWNER := intel
94LOCAL_MODULE_TAGS := $(common_module_tags)
95
96LOCAL_CFLAGS := $(common_cflags)
97
98LOCAL_C_INCLUDES += $(common_c_includes)
99
100LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)-host
101LOCAL_STATIC_LIBRARIES := libxml2
102
103LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
104
105include $(BUILD_HOST_SHARED_LIBRARY)
106
107