blob: 7bd317b77cbc464957ccbe69e68b245f0ce2cc73 [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 Albert5c190402015-04-29 11:32:23 -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 Albert5c190402015-04-29 11:32:23 -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
Dan Albert5c190402015-04-29 11:32:23 -070043LOCAL_SRC_FILES := $(libbase_src_files)
Dan Albertc007bc32015-03-16 10:08:46 -070044LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
45LOCAL_CPPFLAGS := $(libbase_cppflags)
46LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Dan Albert7dfb61d2015-03-20 13:46:28 -070047LOCAL_STATIC_LIBRARIES := libcutils
Dan Albertc007bc32015-03-16 10:08:46 -070048LOCAL_MULTILIB := both
49include $(BUILD_STATIC_LIBRARY)
50
51include $(CLEAR_VARS)
52LOCAL_MODULE := libbase
53LOCAL_CLANG := true
54LOCAL_WHOLE_STATIC_LIBRARIES := libbase
55LOCAL_SHARED_LIBRARIES := liblog
56LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Dan Albert7dfb61d2015-03-20 13:46:28 -070057LOCAL_SHARED_LIBRARIES := libcutils
Dan Albertc007bc32015-03-16 10:08:46 -070058LOCAL_MULTILIB := both
59include $(BUILD_SHARED_LIBRARY)
60
61# Host
62# ------------------------------------------------------------------------------
63include $(CLEAR_VARS)
64LOCAL_MODULE := libbase
Dan Albertc007bc32015-03-16 10:08:46 -070065LOCAL_SRC_FILES := $(libbase_src_files)
66LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
67LOCAL_CPPFLAGS := $(libbase_cppflags)
68LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Dan Albert7dfb61d2015-03-20 13:46:28 -070069LOCAL_STATIC_LIBRARIES := libcutils
Dan Albertc007bc32015-03-16 10:08:46 -070070LOCAL_MULTILIB := both
71include $(BUILD_HOST_STATIC_LIBRARY)
72
73include $(CLEAR_VARS)
74LOCAL_MODULE := libbase
Dan Albertc007bc32015-03-16 10:08:46 -070075LOCAL_WHOLE_STATIC_LIBRARIES := libbase
76LOCAL_SHARED_LIBRARIES := liblog
77LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Dan Albert7dfb61d2015-03-20 13:46:28 -070078LOCAL_STATIC_LIBRARIES := libcutils
Dan Albertc007bc32015-03-16 10:08:46 -070079LOCAL_MULTILIB := both
80include $(BUILD_HOST_SHARED_LIBRARY)
81
82# Tests
83# ------------------------------------------------------------------------------
84include $(CLEAR_VARS)
85LOCAL_MODULE := libbase_test
86LOCAL_CLANG := true
Dan Albert5c190402015-04-29 11:32:23 -070087LOCAL_SRC_FILES := $(libbase_test_src_files)
Dan Albert58310b42015-03-13 23:06:01 -070088LOCAL_C_INCLUDES := $(LOCAL_PATH)
Dan Albertc007bc32015-03-16 10:08:46 -070089LOCAL_CPPFLAGS := $(libbase_cppflags)
90LOCAL_SHARED_LIBRARIES := libbase
91LOCAL_MULTILIB := both
92LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
93LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
94include $(BUILD_NATIVE_TEST)
95
96include $(CLEAR_VARS)
97LOCAL_MODULE := libbase_test
Dan Albertc007bc32015-03-16 10:08:46 -070098LOCAL_SRC_FILES := $(libbase_test_src_files)
Dan Albert58310b42015-03-13 23:06:01 -070099LOCAL_C_INCLUDES := $(LOCAL_PATH)
Dan Albertc007bc32015-03-16 10:08:46 -0700100LOCAL_CPPFLAGS := $(libbase_cppflags)
101LOCAL_SHARED_LIBRARIES := libbase
102LOCAL_MULTILIB := both
103LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
104LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
105include $(BUILD_HOST_NATIVE_TEST)