blob: 168c423a5fb9c3c9d16fdb7ede111dca43f90533 [file] [log] [blame]
David Wagnerb76c9d62014-02-05 18:30:24 +01001# Copyright (c) 2011-2014, Intel Corporation
2# All rights reserved.
Francois Gaffiecee2d6b2013-12-13 11:08:51 +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:
Francois Gaffiecee2d6b2013-12-13 11:08:51 +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.
Francois Gaffiecee2d6b2013-12-13 11:08:51 +010028
Kevin Rocard6ac99e52013-05-07 17:29:53 +020029LOCAL_PATH := $(call my-dir)
Patrick Benavoli68a91282011-08-31 11:23:23 +020030
Kevin Rocardb9e635e2013-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_src_files := \
Kevin Rocardace81f82012-12-11 16:19:17 +010035 Tokenizer.cpp \
David Wagnerc3f617e2014-02-13 10:44:53 +010036 Utility.cpp \
Jean-Michel Trivia9be2d32015-07-15 15:37:57 -070037 NaiveTokenizer.cpp \
38 FullIo.cpp \
Patrick Benavoli68a91282011-08-31 11:23:23 +020039
David Wagner6c15c4f2014-02-13 10:51:17 +010040common_module := libpfw_utility
Kevin Rocard310c4992013-06-24 18:12:18 +020041common_module_tags := optional
Patrick Benavoli68a91282011-08-31 11:23:23 +020042
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020043common_cflags := \
44 -Wall \
45 -Werror \
46 -Wextra \
47 -Wno-unused-parameter
48
Kevin Rocardb9e635e2013-05-07 17:29:53 +020049#############################
50# Target build
Patrick Benavoli68a91282011-08-31 11:23:23 +020051
Kevin Rocardb9e635e2013-05-07 17:29:53 +020052include $(CLEAR_VARS)
Patrick Benavoli68a91282011-08-31 11:23:23 +020053
Kevin Rocard310c4992013-06-24 18:12:18 +020054LOCAL_SRC_FILES := $(common_src_files)
Patrick Benavoli68a91282011-08-31 11:23:23 +020055
Francois Gaffiecee2d6b2013-12-13 11:08:51 +010056LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
57
Kevin Rocard310c4992013-06-24 18:12:18 +020058LOCAL_MODULE := $(common_module)
David Wagnerc943ea62014-08-26 17:41:53 +020059LOCAL_MODULE_OWNER := intel
Kevin Rocard310c4992013-06-24 18:12:18 +020060LOCAL_MODULE_TAGS := $(common_module_tags)
Patrick Benavoli68a91282011-08-31 11:23:23 +020061
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020062LOCAL_CFLAGS := $(common_cflags)
63
Patrick Benavoli68a91282011-08-31 11:23:23 +020064include $(BUILD_STATIC_LIBRARY)
65
Kevin Rocardb9e635e2013-05-07 17:29:53 +020066##############################
67# Host build
68
69include $(CLEAR_VARS)
70
Kevin Rocard310c4992013-06-24 18:12:18 +020071LOCAL_SRC_FILES := $(common_src_files)
Kevin Rocardb9e635e2013-05-07 17:29:53 +020072
Francois Gaffiecee2d6b2013-12-13 11:08:51 +010073LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
74
Kevin Rocard310c4992013-06-24 18:12:18 +020075LOCAL_MODULE := $(common_module)_host
David Wagnerc943ea62014-08-26 17:41:53 +020076LOCAL_MODULE_OWNER := intel
Kevin Rocard310c4992013-06-24 18:12:18 +020077LOCAL_MODULE_TAGS := $(common_module_tags)
Kevin Rocardb9e635e2013-05-07 17:29:53 +020078
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020079LOCAL_CFLAGS := $(common_cflags)
80
Kevin Rocardb9e635e2013-05-07 17:29:53 +020081include $(BUILD_HOST_STATIC_LIBRARY)