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_copy_headers_to := parameter
35
36common_copy_headers := \
37        include/ParameterMgrLoggerForward.h \
38        include/ParameterMgrPlatformConnector.h \
39        include/ParameterMgrFullConnector.h \
40        include/SelectionCriterionTypeInterface.h \
41        include/SelectionCriterionInterface.h \
42        include/ParameterHandle.h
43
44common_src_files := \
45        AreaConfiguration.cpp \
46        ArrayParameter.cpp \
47        AutoLog.cpp \
48        BaseParameter.cpp \
49        BinarySerializableElement.cpp \
50        BinaryStream.cpp \
51        BitParameterBlock.cpp \
52        BitParameterBlockType.cpp \
53        BitParameter.cpp \
54        BitParameterType.cpp \
55        BitwiseAreaConfiguration.cpp \
56        BooleanParameterType.cpp \
57        ComponentInstance.cpp \
58        ComponentLibrary.cpp \
59        ComponentType.cpp \
60        CompoundRule.cpp \
61        ConfigurableDomain.cpp \
62        ConfigurableDomains.cpp \
63        ConfigurableElementAggregator.cpp \
64        ConfigurableElement.cpp \
65        ConfigurationAccessContext.cpp \
66        DomainConfiguration.cpp \
67        Element.cpp \
68        ElementLibrary.cpp \
69        ElementLibrarySet.cpp \
70        ElementLocator.cpp \
71        EnumParameterType.cpp \
72        EnumValuePair.cpp \
73        ErrorContext.cpp \
74        FixedPointParameterType.cpp \
75        FormattedSubsystemObject.cpp \
76        FrameworkConfigurationLocation.cpp \
77        HardwareBackSynchronizer.cpp \
78        InstanceConfigurableElement.cpp \
79        InstanceDefinition.cpp \
80        IntegerParameterType.cpp \
81        LinearParameterAdaptation.cpp \
82        LogarithmicParameterAdaptation.cpp \
83        MappingContext.cpp \
84        MappingData.cpp \
85        ParameterAccessContext.cpp \
86        ParameterAdaptation.cpp \
87        ParameterBlackboard.cpp \
88        ParameterBlockType.cpp \
89        Parameter.cpp \
90        ParameterFrameworkConfiguration.cpp \
91        ParameterHandle.cpp \
92        ParameterMgr.cpp \
93        ParameterMgrFullConnector.cpp \
94        ParameterMgrPlatformConnector.cpp \
95        ParameterType.cpp \
96        PathNavigator.cpp \
97        PluginLocation.cpp \
98        RuleParser.cpp \
99        SelectionCriteria.cpp \
100        SelectionCriteriaDefinition.cpp \
101        SelectionCriterion.cpp \
102        SelectionCriterionLibrary.cpp \
103        SelectionCriterionRule.cpp \
104        SelectionCriterionType.cpp \
105        SimulatedBackSynchronizer.cpp \
106        StringParameter.cpp \
107        StringParameterType.cpp \
108        Subsystem.cpp \
109        SubsystemElementBuilder.cpp \
110        SubsystemObject.cpp \
111        SubsystemObjectCreator.cpp \
112        SyncerSet.cpp \
113        SystemClass.cpp \
114        TypeElement.cpp \
115        VirtualSubsystem.cpp \
116        VirtualSyncer.cpp \
117        XmlElementSerializingContext.cpp \
118        XmlFileIncluderElement.cpp \
119        XmlParameterSerializingContext.cpp
120
121common_module := libparameter
122common_module_tags := optional
123
124common_cflags := \
125        -Wall \
126        -Werror \
127        -Wextra \
128        -Wno-unused-parameter \
129        -Wno-maybe-uninitialized
130
131common_c_includes := \
132    $(LOCAL_PATH)/include/ \
133    $(LOCAL_PATH)/../utility/ \
134    $(LOCAL_PATH)/../remote-processor/
135
136#############################
137# Target build
138
139include $(CLEAR_VARS)
140
141LOCAL_COPY_HEADERS_TO := $(common_copy_headers_to)
142LOCAL_COPY_HEADERS := $(common_copy_headers)
143
144LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
145
146LOCAL_CFLAGS := $(common_cflags)
147
148LOCAL_SRC_FILES := $(common_src_files)
149
150LOCAL_MODULE := $(common_module)
151LOCAL_MODULE_OWNER := intel
152LOCAL_MODULE_TAGS := $(common_module_tags)
153
154LOCAL_C_INCLUDES := $(common_c_includes)
155
156LOCAL_SHARED_LIBRARIES := libxmlserializer libdl
157LOCAL_STATIC_LIBRARIES := libpfw_utility
158
159LOCAL_REQUIRED_MODULES := libremote-processor
160
161include $(BUILD_SHARED_LIBRARY)
162
163##############################
164# Host build
165
166include $(CLEAR_VARS)
167
168LOCAL_COPY_HEADERS_TO := $(common_copy_headers_to)
169LOCAL_COPY_HEADERS := $(common_copy_headers)
170
171LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
172
173LOCAL_CFLAGS := $(common_cflags) -O0 -ggdb
174
175LOCAL_SRC_FILES := $(common_src_files)
176
177LOCAL_MODULE := $(common_module)_host
178LOCAL_MODULE_OWNER := intel
179LOCAL_MODULE_TAGS := $(common_module_tags)
180
181LOCAL_C_INCLUDES += \
182    $(common_c_includes)
183
184LOCAL_SHARED_LIBRARIES := libxmlserializer_host
185LOCAL_STATIC_LIBRARIES := libpfw_utility_host libxml2
186
187LOCAL_LDLIBS += -ldl
188
189include $(BUILD_HOST_SHARED_LIBRARY)
190