blob: 162c6cb56b6c36e5eecbce9803a1dfb1e7f7e918 [file] [log] [blame]
Dan Albertc007bc32015-03-16 10:08:46 -07001#
2# Copyright (C) 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH := $(call my-dir)
18
19libbase_src_files := \
20 file.cpp \
Dan Albert58310b42015-03-13 23:06:01 -070021 logging.cpp \
Dan Albertc007bc32015-03-16 10:08:46 -070022 stringprintf.cpp \
Dan Albert0f1e5442015-03-13 22:57:40 -070023 strings.cpp \
Dan Albertc007bc32015-03-16 10:08:46 -070024
25libbase_test_src_files := \
26 file_test.cpp \
Dan Albert58310b42015-03-13 23:06:01 -070027 logging_test.cpp \
Dan Albertc007bc32015-03-16 10:08:46 -070028 stringprintf_test.cpp \
Dan Albert0f1e5442015-03-13 22:57:40 -070029 strings_test.cpp \
Dan Albert58310b42015-03-13 23:06:01 -070030 test_main.cpp \
31 test_utils.cpp \
Dan Albertc007bc32015-03-16 10:08:46 -070032
33libbase_cppflags := \
34 -Wall \
35 -Wextra \
36 -Werror \
37
38# Device
39# ------------------------------------------------------------------------------
40include $(CLEAR_VARS)
41LOCAL_MODULE := libbase
42LOCAL_CLANG := true
43LOCAL_SRC_FILES := $(libbase_src_files)
44LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
45LOCAL_CPPFLAGS := $(libbase_cppflags)
46LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
47LOCAL_MULTILIB := both
48include $(BUILD_STATIC_LIBRARY)
49
50include $(CLEAR_VARS)
51LOCAL_MODULE := libbase
52LOCAL_CLANG := true
53LOCAL_WHOLE_STATIC_LIBRARIES := libbase
54LOCAL_SHARED_LIBRARIES := liblog
55LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
56LOCAL_MULTILIB := both
57include $(BUILD_SHARED_LIBRARY)
58
59# Host
60# ------------------------------------------------------------------------------
61include $(CLEAR_VARS)
62LOCAL_MODULE := libbase
Dan Albertc007bc32015-03-16 10:08:46 -070063LOCAL_SRC_FILES := $(libbase_src_files)
64LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
65LOCAL_CPPFLAGS := $(libbase_cppflags)
66LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
67LOCAL_MULTILIB := both
68include $(BUILD_HOST_STATIC_LIBRARY)
69
70include $(CLEAR_VARS)
71LOCAL_MODULE := libbase
Dan Albertc007bc32015-03-16 10:08:46 -070072LOCAL_WHOLE_STATIC_LIBRARIES := libbase
73LOCAL_SHARED_LIBRARIES := liblog
74LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
75LOCAL_MULTILIB := both
76include $(BUILD_HOST_SHARED_LIBRARY)
77
78# Tests
79# ------------------------------------------------------------------------------
80include $(CLEAR_VARS)
81LOCAL_MODULE := libbase_test
82LOCAL_CLANG := true
83LOCAL_SRC_FILES := $(libbase_test_src_files)
Dan Albert58310b42015-03-13 23:06:01 -070084LOCAL_C_INCLUDES := $(LOCAL_PATH)
Dan Albertc007bc32015-03-16 10:08:46 -070085LOCAL_CPPFLAGS := $(libbase_cppflags)
86LOCAL_SHARED_LIBRARIES := libbase
87LOCAL_MULTILIB := both
88LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
89LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
90include $(BUILD_NATIVE_TEST)
91
92include $(CLEAR_VARS)
93LOCAL_MODULE := libbase_test
Dan Albertc007bc32015-03-16 10:08:46 -070094LOCAL_SRC_FILES := $(libbase_test_src_files)
Dan Albert58310b42015-03-13 23:06:01 -070095LOCAL_C_INCLUDES := $(LOCAL_PATH)
Dan Albertc007bc32015-03-16 10:08:46 -070096LOCAL_CPPFLAGS := $(libbase_cppflags)
97LOCAL_SHARED_LIBRARIES := libbase
98LOCAL_MULTILIB := both
99LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
100LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
101include $(BUILD_HOST_NATIVE_TEST)