Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 1 | # |
| 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 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | libbase_src_files := \ |
| 20 | file.cpp \ |
Dan Albert | 5c19040 | 2015-04-29 11:32:23 -0700 | [diff] [blame] | 21 | logging.cpp \ |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 22 | stringprintf.cpp \ |
Dan Albert | 0f1e544 | 2015-03-13 22:57:40 -0700 | [diff] [blame] | 23 | strings.cpp \ |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 24 | |
| 25 | libbase_test_src_files := \ |
| 26 | file_test.cpp \ |
Dan Albert | 5c19040 | 2015-04-29 11:32:23 -0700 | [diff] [blame] | 27 | logging_test.cpp \ |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 28 | stringprintf_test.cpp \ |
Dan Albert | 0f1e544 | 2015-03-13 22:57:40 -0700 | [diff] [blame] | 29 | strings_test.cpp \ |
Dan Albert | 58310b4 | 2015-03-13 23:06:01 -0700 | [diff] [blame] | 30 | test_main.cpp \ |
| 31 | test_utils.cpp \ |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 32 | |
| 33 | libbase_cppflags := \ |
| 34 | -Wall \ |
| 35 | -Wextra \ |
| 36 | -Werror \ |
| 37 | |
| 38 | # Device |
| 39 | # ------------------------------------------------------------------------------ |
| 40 | include $(CLEAR_VARS) |
| 41 | LOCAL_MODULE := libbase |
| 42 | LOCAL_CLANG := true |
Dan Albert | 5c19040 | 2015-04-29 11:32:23 -0700 | [diff] [blame] | 43 | LOCAL_SRC_FILES := $(libbase_src_files) |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 44 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 45 | LOCAL_CPPFLAGS := $(libbase_cppflags) |
| 46 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Dan Albert | 7dfb61d | 2015-03-20 13:46:28 -0700 | [diff] [blame] | 47 | LOCAL_STATIC_LIBRARIES := libcutils |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 48 | LOCAL_MULTILIB := both |
| 49 | include $(BUILD_STATIC_LIBRARY) |
| 50 | |
| 51 | include $(CLEAR_VARS) |
| 52 | LOCAL_MODULE := libbase |
| 53 | LOCAL_CLANG := true |
| 54 | LOCAL_WHOLE_STATIC_LIBRARIES := libbase |
| 55 | LOCAL_SHARED_LIBRARIES := liblog |
| 56 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Dan Albert | 7dfb61d | 2015-03-20 13:46:28 -0700 | [diff] [blame] | 57 | LOCAL_SHARED_LIBRARIES := libcutils |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 58 | LOCAL_MULTILIB := both |
| 59 | include $(BUILD_SHARED_LIBRARY) |
| 60 | |
| 61 | # Host |
| 62 | # ------------------------------------------------------------------------------ |
| 63 | include $(CLEAR_VARS) |
| 64 | LOCAL_MODULE := libbase |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 65 | LOCAL_SRC_FILES := $(libbase_src_files) |
| 66 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 67 | LOCAL_CPPFLAGS := $(libbase_cppflags) |
| 68 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Dan Albert | 7dfb61d | 2015-03-20 13:46:28 -0700 | [diff] [blame] | 69 | LOCAL_STATIC_LIBRARIES := libcutils |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 70 | LOCAL_MULTILIB := both |
| 71 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 72 | |
| 73 | include $(CLEAR_VARS) |
| 74 | LOCAL_MODULE := libbase |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 75 | LOCAL_WHOLE_STATIC_LIBRARIES := libbase |
| 76 | LOCAL_SHARED_LIBRARIES := liblog |
| 77 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Dan Albert | 7dfb61d | 2015-03-20 13:46:28 -0700 | [diff] [blame] | 78 | LOCAL_STATIC_LIBRARIES := libcutils |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 79 | LOCAL_MULTILIB := both |
| 80 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 81 | |
| 82 | # Tests |
| 83 | # ------------------------------------------------------------------------------ |
| 84 | include $(CLEAR_VARS) |
| 85 | LOCAL_MODULE := libbase_test |
| 86 | LOCAL_CLANG := true |
Dan Albert | 5c19040 | 2015-04-29 11:32:23 -0700 | [diff] [blame] | 87 | LOCAL_SRC_FILES := $(libbase_test_src_files) |
Dan Albert | 58310b4 | 2015-03-13 23:06:01 -0700 | [diff] [blame] | 88 | LOCAL_C_INCLUDES := $(LOCAL_PATH) |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 89 | LOCAL_CPPFLAGS := $(libbase_cppflags) |
| 90 | LOCAL_SHARED_LIBRARIES := libbase |
| 91 | LOCAL_MULTILIB := both |
| 92 | LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32 |
| 93 | LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64 |
| 94 | include $(BUILD_NATIVE_TEST) |
| 95 | |
| 96 | include $(CLEAR_VARS) |
| 97 | LOCAL_MODULE := libbase_test |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 98 | LOCAL_SRC_FILES := $(libbase_test_src_files) |
Dan Albert | 58310b4 | 2015-03-13 23:06:01 -0700 | [diff] [blame] | 99 | LOCAL_C_INCLUDES := $(LOCAL_PATH) |
Dan Albert | c007bc3 | 2015-03-16 10:08:46 -0700 | [diff] [blame] | 100 | LOCAL_CPPFLAGS := $(libbase_cppflags) |
| 101 | LOCAL_SHARED_LIBRARIES := libbase |
| 102 | LOCAL_MULTILIB := both |
| 103 | LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32 |
| 104 | LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64 |
| 105 | include $(BUILD_HOST_NATIVE_TEST) |