blob: 2856024dad86f6c3ddbc98ac0569b8e2935d7718 [file] [log] [blame]
Francois Gaffiecee2d6b2013-12-13 11:08:51 +01001# INTEL CONFIDENTIAL
2#
3# Copyright 2013 Intel Corporation All Rights Reserved.
4# The source code contained or described herein and all documents
5# related to the source code ("Material") are owned by Intel
6# Corporation or its suppliers or licensors. Title to the Material
7# remains with Intel Corporation or its suppliers and licensors. The
8# Material contains trade secrets and proprietary and confidential
9# information of Intel or its suppliers and licensors. The Material is
10# protected by worldwide copyright and trade secret laws and treaty
11# provisions. No part of the Material may be used, copied, reproduced,
12# modified, published, uploaded, posted, transmitted, distributed, or
13# disclosed in any way without Intel's prior express written permission.
14#
15# No license under any patent, copyright, trade secret or other
16# intellectual property right is granted to or conferred upon you by
17# disclosure or delivery of the Materials, either expressly, by
18# implication, inducement, estoppel or otherwise. Any license under
19# such intellectual property rights must be express and approved by
20# Intel in writing.
21
Kevin Rocard6ac99e52013-05-07 17:29:53 +020022LOCAL_PATH := $(call my-dir)
Patrick Benavoli68a91282011-08-31 11:23:23 +020023
Kevin Rocardb9e635e2013-05-07 17:29:53 +020024####################
25# Common definitions
Patrick Benavoli68a91282011-08-31 11:23:23 +020026
Kevin Rocard310c4992013-06-24 18:12:18 +020027common_src_files := \
Kevin Rocardace81f82012-12-11 16:19:17 +010028 Tokenizer.cpp \
29 Utility.cpp
Patrick Benavoli68a91282011-08-31 11:23:23 +020030
Kevin Rocard310c4992013-06-24 18:12:18 +020031common_module := libutility
32common_module_tags := optional
Patrick Benavoli68a91282011-08-31 11:23:23 +020033
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020034common_cflags := \
35 -Wall \
36 -Werror \
37 -Wextra \
38 -Wno-unused-parameter
39
Kevin Rocardb9e635e2013-05-07 17:29:53 +020040#############################
41# Target build
Patrick Benavoli68a91282011-08-31 11:23:23 +020042
Kevin Rocardb9e635e2013-05-07 17:29:53 +020043include $(CLEAR_VARS)
Patrick Benavoli68a91282011-08-31 11:23:23 +020044
Kevin Rocard310c4992013-06-24 18:12:18 +020045LOCAL_SRC_FILES := $(common_src_files)
Patrick Benavoli68a91282011-08-31 11:23:23 +020046
Francois Gaffiecee2d6b2013-12-13 11:08:51 +010047LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
48
Kevin Rocard310c4992013-06-24 18:12:18 +020049LOCAL_MODULE := $(common_module)
50LOCAL_MODULE_TAGS := $(common_module_tags)
Patrick Benavoli68a91282011-08-31 11:23:23 +020051
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020052LOCAL_CFLAGS := $(common_cflags)
53
Patrick Benavoli68a91282011-08-31 11:23:23 +020054LOCAL_C_INCLUDES += \
Chetan Rao55f41bc2013-04-29 11:53:42 +030055 $(call include-path-for, stlport) \
56 bionic
Patrick Benavoli68a91282011-08-31 11:23:23 +020057
58include $(BUILD_STATIC_LIBRARY)
59
Kevin Rocardb9e635e2013-05-07 17:29:53 +020060##############################
61# Host build
62
63include $(CLEAR_VARS)
64
Kevin Rocard310c4992013-06-24 18:12:18 +020065LOCAL_SRC_FILES := $(common_src_files)
Kevin Rocardb9e635e2013-05-07 17:29:53 +020066
Francois Gaffiecee2d6b2013-12-13 11:08:51 +010067LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
68
Kevin Rocard310c4992013-06-24 18:12:18 +020069LOCAL_MODULE := $(common_module)_host
70LOCAL_MODULE_TAGS := $(common_module_tags)
Kevin Rocardb9e635e2013-05-07 17:29:53 +020071
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020072LOCAL_CFLAGS := $(common_cflags)
73
Kevin Rocardb9e635e2013-05-07 17:29:53 +020074include $(BUILD_HOST_STATIC_LIBRARY)