blob: 5249a308c92cc08ab4c117e0d20b5fa05a6bce03 [file] [log] [blame]
Kevin Rocard6ac99e52013-05-07 17:29:53 +02001LOCAL_PATH := $(call my-dir)
Patrick Benavoli68a91282011-08-31 11:23:23 +02002
Kevin Rocardb9e635e2013-05-07 17:29:53 +02003####################
4# Common definitions
Patrick Benavoli68a91282011-08-31 11:23:23 +02005
Kevin Rocard310c4992013-06-24 18:12:18 +02006common_src_files := \
Kevin Rocardace81f82012-12-11 16:19:17 +01007 Tokenizer.cpp \
8 Utility.cpp
Patrick Benavoli68a91282011-08-31 11:23:23 +02009
Kevin Rocard310c4992013-06-24 18:12:18 +020010common_module := libutility
11common_module_tags := optional
Patrick Benavoli68a91282011-08-31 11:23:23 +020012
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020013common_cflags := \
14 -Wall \
15 -Werror \
16 -Wextra \
17 -Wno-unused-parameter
18
Kevin Rocardb9e635e2013-05-07 17:29:53 +020019#############################
20# Target build
Patrick Benavoli68a91282011-08-31 11:23:23 +020021
Kevin Rocardb9e635e2013-05-07 17:29:53 +020022include $(CLEAR_VARS)
Patrick Benavoli68a91282011-08-31 11:23:23 +020023
Kevin Rocard310c4992013-06-24 18:12:18 +020024LOCAL_SRC_FILES := $(common_src_files)
Patrick Benavoli68a91282011-08-31 11:23:23 +020025
Kevin Rocard310c4992013-06-24 18:12:18 +020026LOCAL_MODULE := $(common_module)
27LOCAL_MODULE_TAGS := $(common_module_tags)
Patrick Benavoli68a91282011-08-31 11:23:23 +020028
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020029LOCAL_CFLAGS := $(common_cflags)
30
Patrick Benavoli68a91282011-08-31 11:23:23 +020031LOCAL_C_INCLUDES += \
Chetan Rao55f41bc2013-04-29 11:53:42 +030032 $(call include-path-for, stlport) \
33 bionic
Patrick Benavoli68a91282011-08-31 11:23:23 +020034
35include $(BUILD_STATIC_LIBRARY)
36
Kevin Rocardb9e635e2013-05-07 17:29:53 +020037##############################
38# Host build
39
40include $(CLEAR_VARS)
41
Kevin Rocard310c4992013-06-24 18:12:18 +020042LOCAL_SRC_FILES := $(common_src_files)
Kevin Rocardb9e635e2013-05-07 17:29:53 +020043
Kevin Rocard310c4992013-06-24 18:12:18 +020044LOCAL_MODULE := $(common_module)_host
45LOCAL_MODULE_TAGS := $(common_module_tags)
Kevin Rocardb9e635e2013-05-07 17:29:53 +020046
Frédéric Boisnard11e31ae2013-08-06 19:23:46 +020047LOCAL_CFLAGS := $(common_cflags)
48
Kevin Rocardb9e635e2013-05-07 17:29:53 +020049include $(BUILD_HOST_STATIC_LIBRARY)