blob: 0625c2bd7714ad5049fa23387ad3f37cec8574c0 [file] [log] [blame]
David Wagnerb76c9d62014-02-05 18:30:24 +01001# Copyright (c) 2011-2014, Intel Corporation
2# All rights reserved.
Guillaume Denneulin1080f662013-12-05 16:24:32 +01003#
David Wagnerb76c9d62014-02-05 18:30:24 +01004# Redistribution and use in source and binary forms, with or without modification,
5# are permitted provided that the following conditions are met:
Guillaume Denneulin1080f662013-12-05 16:24:32 +01006#
David Wagnerb76c9d62014-02-05 18:30:24 +01007# 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.
Guillaume Denneulin1080f662013-12-05 16:24:32 +010028
Kevin Rocard6ac99e52013-05-07 17:29:53 +020029LOCAL_PATH := $(call my-dir)
Patrick Benavoli68a91282011-08-31 11:23:23 +020030
Kevin Rocard7d7de5f2013-05-07 17:29:53 +020031####################
32# Common definitions
Patrick Benavoli68a91282011-08-31 11:23:23 +020033
Kevin Rocard310c4992013-06-24 18:12:18 +020034common_copy_headers_to := parameter
Patrick Benavoli68a91282011-08-31 11:23:23 +020035
Kevin Rocard310c4992013-06-24 18:12:18 +020036common_copy_headers := \
David Wagnerd7007822015-01-06 18:27:08 +010037 include/ParameterMgrLoggerForward.h \
Kevin Rocarda4c39f12013-05-24 17:23:09 +020038 include/ParameterMgrPlatformConnector.h \
39 include/SelectionCriterionTypeInterface.h \
40 include/SelectionCriterionInterface.h \
41 include/ParameterHandle.h
Patrick Benavoli68a91282011-08-31 11:23:23 +020042
Kevin Rocard310c4992013-06-24 18:12:18 +020043common_src_files := \
Patrick Benavoli68a91282011-08-31 11:23:23 +020044 AreaConfiguration.cpp \
David Wagnera53f6502015-01-06 18:30:49 +010045 ArrayParameter.cpp \
Patrick Benavoli68a91282011-08-31 11:23:23 +020046 AutoLog.cpp \
Patrick Benavoli1387bda2011-08-31 11:23:24 +020047 BaseParameter.cpp \
David Wagnera53f6502015-01-06 18:30:49 +010048 BinarySerializableElement.cpp \
49 BinaryStream.cpp \
50 BitParameterBlock.cpp \
51 BitParameterBlockType.cpp \
52 BitParameter.cpp \
53 BitParameterType.cpp \
54 BitwiseAreaConfiguration.cpp \
55 BooleanParameterType.cpp \
56 ComponentInstance.cpp \
57 ComponentLibrary.cpp \
58 ComponentType.cpp \
59 CompoundRule.cpp \
60 ConfigurableDomain.cpp \
61 ConfigurableDomains.cpp \
62 ConfigurableElementAggregator.cpp \
63 ConfigurableElement.cpp \
64 ConfigurationAccessContext.cpp \
65 DomainConfiguration.cpp \
66 Element.cpp \
67 ElementLibrary.cpp \
68 ElementLibrarySet.cpp \
69 ElementLocator.cpp \
Patrick Benavoli6ccab9d2011-11-10 23:21:01 +010070 EnumParameterType.cpp \
David Wagnera53f6502015-01-06 18:30:49 +010071 EnumValuePair.cpp \
72 ErrorContext.cpp \
73 FixedPointParameterType.cpp \
74 FormattedSubsystemObject.cpp \
75 FrameworkConfigurationLocation.cpp \
76 HardwareBackSynchronizer.cpp \
77 InstanceConfigurableElement.cpp \
78 InstanceDefinition.cpp \
79 IntegerParameterType.cpp \
80 LinearParameterAdaptation.cpp \
81 MappingContext.cpp \
82 MappingData.cpp \
83 ParameterAccessContext.cpp \
84 ParameterAdaptation.cpp \
85 ParameterBlackboard.cpp \
86 ParameterBlockType.cpp \
87 Parameter.cpp \
88 ParameterFrameworkConfiguration.cpp \
89 ParameterHandle.cpp \
90 ParameterMgr.cpp \
91 ParameterMgrPlatformConnector.cpp \
92 ParameterType.cpp \
93 PathNavigator.cpp \
94 PluginLocation.cpp \
95 RuleParser.cpp \
96 SelectionCriteria.cpp \
97 SelectionCriteriaDefinition.cpp \
98 SelectionCriterion.cpp \
99 SelectionCriterionLibrary.cpp \
100 SelectionCriterionRule.cpp \
101 SelectionCriterionType.cpp \
102 SimulatedBackSynchronizer.cpp \
103 StringParameter.cpp \
104 StringParameterType.cpp \
105 Subsystem.cpp \
106 SubsystemElementBuilder.cpp \
107 SubsystemObject.cpp \
108 SubsystemObjectCreator.cpp \
109 SyncerSet.cpp \
110 SystemClass.cpp \
111 TypeElement.cpp \
Patrick Benavoli6ccab9d2011-11-10 23:21:01 +0100112 VirtualSubsystem.cpp \
Patrick Benavoli065264a2011-11-20 15:46:41 +0100113 VirtualSyncer.cpp \
David Wagnera53f6502015-01-06 18:30:49 +0100114 XmlElementSerializingContext.cpp \
115 XmlFileIncluderElement.cpp \
116 XmlParameterSerializingContext.cpp
Patrick Benavoli68a91282011-08-31 11:23:23 +0200117
Kevin Rocard310c4992013-06-24 18:12:18 +0200118common_module := libparameter
119common_module_tags := optional
Patrick Benavoli68a91282011-08-31 11:23:23 +0200120
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +0200121common_cflags := \
122 -Wall \
123 -Werror \
124 -Wextra \
125 -Wno-unused-parameter
126
Kevin Rocard310c4992013-06-24 18:12:18 +0200127common_c_includes := \
Kevin Rocarda4c39f12013-05-24 17:23:09 +0200128 $(LOCAL_PATH)/include/ \
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200129 $(LOCAL_PATH)/../utility/ \
130 $(LOCAL_PATH)/../xmlserializer/ \
131 $(LOCAL_PATH)/../remote-processor/
Patrick Benavoli68a91282011-08-31 11:23:23 +0200132
Kevin Rocard310c4992013-06-24 18:12:18 +0200133common_shared_libraries := libicuuc
Guillaume Denneulin1080f662013-12-05 16:24:32 +0100134
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200135#############################
136# Target build
137
138include $(CLEAR_VARS)
139
Kevin Rocard310c4992013-06-24 18:12:18 +0200140LOCAL_COPY_HEADERS_TO := $(common_copy_headers_to)
141LOCAL_COPY_HEADERS := $(common_copy_headers)
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200142
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +0200143LOCAL_CFLAGS := $(common_cflags)
144
Kevin Rocard310c4992013-06-24 18:12:18 +0200145LOCAL_SRC_FILES := $(common_src_files)
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200146
Kevin Rocard310c4992013-06-24 18:12:18 +0200147LOCAL_MODULE := $(common_module)
David Wagnerc943ea62014-08-26 17:41:53 +0200148LOCAL_MODULE_OWNER := intel
Kevin Rocard310c4992013-06-24 18:12:18 +0200149LOCAL_MODULE_TAGS := $(common_module_tags)
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200150
Mattijs Korpershoek23124b72014-06-27 09:58:03 +0200151LOCAL_C_INCLUDES := $(common_c_includes)
Patrick Benavoli68a91282011-08-31 11:23:23 +0200152
Mattijs Korpershoek23124b72014-06-27 09:58:03 +0200153LOCAL_SHARED_LIBRARIES := $(common_shared_libraries) libdl
Mattijs Korpershoekcce85f62014-04-08 14:10:03 +0200154LOCAL_STATIC_LIBRARIES := libxmlserializer libpfw_utility libxml2
Patrick Benavoli68a91282011-08-31 11:23:23 +0200155
David Wagner0c872ff2014-10-24 16:39:06 +0200156LOCAL_CLANG := false
Mattijs Korpershoek23124b72014-06-27 09:58:03 +0200157include external/stlport/libstlport.mk
Patrick Benavoli68a91282011-08-31 11:23:23 +0200158include $(BUILD_SHARED_LIBRARY)
159
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200160##############################
161# Host build
162
163include $(CLEAR_VARS)
164
Kevin Rocard310c4992013-06-24 18:12:18 +0200165LOCAL_COPY_HEADERS_TO := $(common_copy_headers_to)
166LOCAL_COPY_HEADERS := $(common_copy_headers)
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200167
Renaud de Chivred55f5862013-09-11 14:33:48 +0200168LOCAL_CFLAGS := $(common_cflags) -O0 -ggdb
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +0200169
Kevin Rocard310c4992013-06-24 18:12:18 +0200170LOCAL_SRC_FILES := $(common_src_files)
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200171
Kevin Rocard310c4992013-06-24 18:12:18 +0200172LOCAL_MODULE := $(common_module)_host
David Wagnerc943ea62014-08-26 17:41:53 +0200173LOCAL_MODULE_OWNER := intel
Kevin Rocard310c4992013-06-24 18:12:18 +0200174LOCAL_MODULE_TAGS := $(common_module_tags)
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200175
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200176LOCAL_C_INCLUDES += \
Kevin Rocard310c4992013-06-24 18:12:18 +0200177 $(common_c_includes)
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200178
Jin Weibf76f6b2013-10-22 12:16:27 +0800179LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)-host
pafonsoXcef5bbc2014-09-01 18:26:22 +0200180LOCAL_STATIC_LIBRARIES := libxmlserializer_host libpfw_utility_host libxml2
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200181
182LOCAL_LDLIBS += -ldl
183
David Wagner0c872ff2014-10-24 16:39:06 +0200184LOCAL_CLANG := false
Kevin Rocard7d7de5f2013-05-07 17:29:53 +0200185include $(BUILD_HOST_SHARED_LIBRARY)
Mattijs Korpershoek93f402c2014-06-23 18:07:52 +0200186
187################################
188# Export includes for plugins (Target build)
189
190include $(CLEAR_VARS)
191
192LOCAL_MODULE := $(common_module)_includes
David Wagnerc943ea62014-08-26 17:41:53 +0200193LOCAL_MODULE_OWNER := intel
Mattijs Korpershoek93f402c2014-06-23 18:07:52 +0200194
195LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
196
197LOCAL_STATIC_LIBRARIES := \
198 libxmlserializer \
199 libpfw_utility \
Mattijs Korpershoekcce85f62014-04-08 14:10:03 +0200200 libxml2
Mattijs Korpershoek93f402c2014-06-23 18:07:52 +0200201
202include $(BUILD_STATIC_LIBRARY)
203
204################################
205# Export includes for plugins (Host build)
206
207include $(CLEAR_VARS)
208
209LOCAL_MODULE := $(common_module)_includes_host
David Wagnerc943ea62014-08-26 17:41:53 +0200210LOCAL_MODULE_OWNER := intel
Mattijs Korpershoek93f402c2014-06-23 18:07:52 +0200211
212LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
213
214LOCAL_STATIC_LIBRARIES := \
215 libxmlserializer_host \
216 libpfw_utility_host \
Mattijs Korpershoekcce85f62014-04-08 14:10:03 +0200217 libxml2
Mattijs Korpershoek93f402c2014-06-23 18:07:52 +0200218
219include $(BUILD_HOST_STATIC_LIBRARY)