Kevin Rocard | 6ac99e5 | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 2 | |
Kevin Rocard | b9e635e | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 3 | #################### |
4 | # Common definitions | ||||
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 5 | |
Kevin Rocard | 310c499 | 2013-06-24 18:12:18 +0200 | [diff] [blame] | 6 | common_src_files := \ |
Kevin Rocard | ace81f8 | 2012-12-11 16:19:17 +0100 | [diff] [blame] | 7 | Tokenizer.cpp \ |
8 | Utility.cpp | ||||
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 9 | |
Kevin Rocard | 310c499 | 2013-06-24 18:12:18 +0200 | [diff] [blame] | 10 | common_module := libutility |
11 | common_module_tags := optional | ||||
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 12 | |
Frédéric Boisnard | 11e31ae | 2013-08-06 19:23:46 +0200 | [diff] [blame^] | 13 | common_cflags := \ |
14 | -Wall \ | ||||
15 | -Werror \ | ||||
16 | -Wextra \ | ||||
17 | -Wno-unused-parameter | ||||
18 | |||||
Kevin Rocard | b9e635e | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 19 | ############################# |
20 | # Target build | ||||
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 21 | |
Kevin Rocard | b9e635e | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 22 | include $(CLEAR_VARS) |
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 23 | |
Kevin Rocard | 310c499 | 2013-06-24 18:12:18 +0200 | [diff] [blame] | 24 | LOCAL_SRC_FILES := $(common_src_files) |
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 25 | |
Kevin Rocard | 310c499 | 2013-06-24 18:12:18 +0200 | [diff] [blame] | 26 | LOCAL_MODULE := $(common_module) |
27 | LOCAL_MODULE_TAGS := $(common_module_tags) | ||||
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 28 | |
Frédéric Boisnard | 11e31ae | 2013-08-06 19:23:46 +0200 | [diff] [blame^] | 29 | LOCAL_CFLAGS := $(common_cflags) |
30 | |||||
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 31 | LOCAL_C_INCLUDES += \ |
Chetan Rao | 55f41bc | 2013-04-29 11:53:42 +0300 | [diff] [blame] | 32 | $(call include-path-for, stlport) \ |
33 | bionic | ||||
Patrick Benavoli | 68a9128 | 2011-08-31 11:23:23 +0200 | [diff] [blame] | 34 | |
35 | include $(BUILD_STATIC_LIBRARY) | ||||
36 | |||||
Kevin Rocard | b9e635e | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 37 | ############################## |
38 | # Host build | ||||
39 | |||||
40 | include $(CLEAR_VARS) | ||||
41 | |||||
Kevin Rocard | 310c499 | 2013-06-24 18:12:18 +0200 | [diff] [blame] | 42 | LOCAL_SRC_FILES := $(common_src_files) |
Kevin Rocard | b9e635e | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 43 | |
Kevin Rocard | 310c499 | 2013-06-24 18:12:18 +0200 | [diff] [blame] | 44 | LOCAL_MODULE := $(common_module)_host |
45 | LOCAL_MODULE_TAGS := $(common_module_tags) | ||||
Kevin Rocard | b9e635e | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 46 | |
Frédéric Boisnard | 11e31ae | 2013-08-06 19:23:46 +0200 | [diff] [blame^] | 47 | LOCAL_CFLAGS := $(common_cflags) |
48 | |||||
Kevin Rocard | b9e635e | 2013-05-07 17:29:53 +0200 | [diff] [blame] | 49 | include $(BUILD_HOST_STATIC_LIBRARY) |