| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | # | 
|  | 2 | # Copyright (C) 2008 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 | LOCAL_PATH := $(my-dir) | 
|  | 17 | include $(CLEAR_VARS) | 
|  | 18 |  | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 19 | libcutils_common_sources := \ | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 20 | atomic.c.arm \ | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 21 | config_utils.c \ | 
| David Pursell | 756e1c8 | 2016-01-29 10:39:41 -0800 | [diff] [blame] | 22 | fs_config.c \ | 
| Mohamad Ayyash | 8c78858 | 2016-04-07 22:13:43 -0700 | [diff] [blame] | 23 | canned_fs_config.c \ | 
| David Pursell | 756e1c8 | 2016-01-29 10:39:41 -0800 | [diff] [blame] | 24 | hashmap.c \ | 
|  | 25 | iosched_policy.c \ | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 26 | load_file.c \ | 
| David Pursell | 756e1c8 | 2016-01-29 10:39:41 -0800 | [diff] [blame] | 27 | native_handle.c \ | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 28 | open_memstream.c \ | 
| David Pursell | 756e1c8 | 2016-01-29 10:39:41 -0800 | [diff] [blame] | 29 | process_name.c \ | 
|  | 30 | record_stream.c \ | 
|  | 31 | sched_policy.c \ | 
|  | 32 | sockets.cpp \ | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 33 | strdup16to8.c \ | 
|  | 34 | strdup8to16.c \ | 
| David Pursell | 756e1c8 | 2016-01-29 10:39:41 -0800 | [diff] [blame] | 35 | strlcpy.c \ | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 36 | threads.c \ | 
| Josh Gao | cab716f | 2015-11-17 14:28:33 -0800 | [diff] [blame] | 37 |  | 
|  | 38 | # some files must not be compiled when building against Mingw | 
|  | 39 | # they correspond to features not used by our host development tools | 
|  | 40 | # which are also hard or even impossible to port to native Win32 | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 41 | libcutils_nonwindows_sources := \ | 
| Jeff Sharkey | 0ee7d8c | 2013-09-20 17:58:54 -0700 | [diff] [blame] | 42 | fs.c \ | 
| Elliott Hughes | 0bff5bd | 2014-05-20 12:01:29 -0700 | [diff] [blame] | 43 | multiuser.c \ | 
| David Pursell | 0eb8e1b | 2016-01-14 17:18:27 -0800 | [diff] [blame] | 44 | socket_inaddr_any_server_unix.c \ | 
|  | 45 | socket_local_client_unix.c \ | 
|  | 46 | socket_local_server_unix.c \ | 
|  | 47 | socket_loopback_client_unix.c \ | 
|  | 48 | socket_loopback_server_unix.c \ | 
|  | 49 | socket_network_client_unix.c \ | 
| David Pursell | b34e4a0 | 2016-02-01 09:42:09 -0800 | [diff] [blame] | 50 | sockets_unix.cpp \ | 
| Josh Gao | 1175d0f | 2015-11-24 09:12:21 -0800 | [diff] [blame] | 51 | str_parms.c \ | 
| Elliott Hughes | 0bff5bd | 2014-05-20 12:01:29 -0700 | [diff] [blame] | 52 |  | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 53 | libcutils_nonwindows_host_sources := \ | 
| Richard Uhler | 7d451ab | 2015-03-20 16:59:40 -0700 | [diff] [blame] | 54 | ashmem-host.c \ | 
| David Pursell | 0eb8e1b | 2016-01-14 17:18:27 -0800 | [diff] [blame] | 55 | trace-host.c \ | 
| Mathieu Chartier | e942d1f | 2014-06-03 18:12:29 -0700 | [diff] [blame] | 56 |  | 
| David Pursell | 0eb8e1b | 2016-01-14 17:18:27 -0800 | [diff] [blame] | 57 | libcutils_windows_host_sources := \ | 
|  | 58 | socket_inaddr_any_server_windows.c \ | 
|  | 59 | socket_network_client_windows.c \ | 
| David Pursell | b34e4a0 | 2016-02-01 09:42:09 -0800 | [diff] [blame] | 60 | sockets_windows.cpp \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 61 |  | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 62 | # Shared and static library for host | 
| David Pursell | 0eb8e1b | 2016-01-14 17:18:27 -0800 | [diff] [blame] | 63 | # Note: when linking this library on Windows, you must also link to Winsock2 | 
|  | 64 | # using "LOCAL_LDLIBS_windows := -lws2_32". | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 65 | # ======================================================== | 
|  | 66 | LOCAL_MODULE := libcutils | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 67 | LOCAL_SRC_FILES := $(libcutils_common_sources) dlmalloc_stubs.c | 
|  | 68 | LOCAL_SRC_FILES_darwin := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources) | 
|  | 69 | LOCAL_SRC_FILES_linux := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources) | 
| David Pursell | 0eb8e1b | 2016-01-14 17:18:27 -0800 | [diff] [blame] | 70 | LOCAL_SRC_FILES_windows := $(libcutils_windows_host_sources) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 71 | LOCAL_STATIC_LIBRARIES := liblog | 
| Josh Gao | 1175d0f | 2015-11-24 09:12:21 -0800 | [diff] [blame] | 72 | LOCAL_CFLAGS := -Werror -Wall -Wextra | 
| Ian Rogers | 59ec765 | 2014-06-05 14:32:49 -0700 | [diff] [blame] | 73 | LOCAL_MULTILIB := both | 
| Josh Gao | cab716f | 2015-11-17 14:28:33 -0800 | [diff] [blame] | 74 | LOCAL_MODULE_HOST_OS := darwin linux windows | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 75 | include $(BUILD_HOST_STATIC_LIBRARY) | 
|  | 76 |  | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 77 | include $(CLEAR_VARS) | 
|  | 78 | LOCAL_MODULE := libcutils | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 79 | LOCAL_SRC_FILES := $(libcutils_common_sources) dlmalloc_stubs.c | 
|  | 80 | LOCAL_SRC_FILES_darwin := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources) | 
|  | 81 | LOCAL_SRC_FILES_linux := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources) | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 82 | LOCAL_SHARED_LIBRARIES := liblog | 
| Josh Gao | 1175d0f | 2015-11-24 09:12:21 -0800 | [diff] [blame] | 83 | LOCAL_CFLAGS := -Werror -Wall -Wextra | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 84 | LOCAL_MULTILIB := both | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 85 | include $(BUILD_HOST_SHARED_LIBRARY) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 86 |  | 
| Jens Gulin | d3c8d5b | 2014-03-06 18:15:43 +0100 | [diff] [blame] | 87 |  | 
| Andrew Hsieh | 99e7f7a | 2012-03-01 23:58:50 -0800 | [diff] [blame] | 88 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 89 | # Shared and static library for target | 
|  | 90 | # ======================================================== | 
| David 'Digit' Turner | 7913bc0 | 2012-01-13 13:38:40 +0100 | [diff] [blame] | 91 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 92 | include $(CLEAR_VARS) | 
|  | 93 | LOCAL_MODULE := libcutils | 
| Josh Gao | 9e86f8e | 2015-11-17 14:17:38 -0800 | [diff] [blame] | 94 | LOCAL_SRC_FILES := $(libcutils_common_sources) \ | 
|  | 95 | $(libcutils_nonwindows_sources) \ | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 96 | android_reboot.c \ | 
|  | 97 | ashmem-dev.c \ | 
|  | 98 | debugger.c \ | 
|  | 99 | klog.c \ | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 100 | partition_utils.c \ | 
| Nick Kralevich | b39e3a8 | 2013-05-23 09:54:47 -0700 | [diff] [blame] | 101 | properties.c \ | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 102 | qtaguid.c \ | 
| Richard Uhler | 7d451ab | 2015-03-20 16:59:40 -0700 | [diff] [blame] | 103 | trace-dev.c \ | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 104 | uevent.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 105 |  | 
| Elliott Hughes | a492f37 | 2015-04-02 10:41:20 -0700 | [diff] [blame] | 106 | LOCAL_SRC_FILES_arm += arch-arm/memset32.S | 
|  | 107 | LOCAL_SRC_FILES_arm64 += arch-arm64/android_memset.S | 
| Duane Sand | 1ef9ccd | 2015-04-16 18:10:37 -0700 | [diff] [blame] | 108 |  | 
|  | 109 | LOCAL_SRC_FILES_mips += arch-mips/android_memset.c | 
|  | 110 | LOCAL_SRC_FILES_mips64 += arch-mips/android_memset.c | 
| Duane Sand | 734f50c | 2014-06-28 18:55:26 -0700 | [diff] [blame] | 111 |  | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 112 | LOCAL_SRC_FILES_x86 += \ | 
|  | 113 | arch-x86/android_memset16.S \ | 
|  | 114 | arch-x86/android_memset32.S \ | 
|  | 115 |  | 
|  | 116 | LOCAL_SRC_FILES_x86_64 += \ | 
| Varvara Rainchik | 458d125 | 2014-09-08 16:27:01 +0400 | [diff] [blame] | 117 | arch-x86_64/android_memset16.S \ | 
|  | 118 | arch-x86_64/android_memset32.S \ | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 119 |  | 
| Colin Cross | 65dd88b | 2014-01-22 19:06:04 -0800 | [diff] [blame] | 120 | LOCAL_C_INCLUDES := $(libcutils_c_includes) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 121 | LOCAL_STATIC_LIBRARIES := liblog | 
| Tim Murray | b769c8d | 2015-06-08 14:56:29 -0700 | [diff] [blame] | 122 | ifneq ($(ENABLE_CPUSETS),) | 
|  | 123 | LOCAL_CFLAGS += -DUSE_CPUSETS | 
|  | 124 | endif | 
| Todd Kjos | ed60788 | 2015-10-26 16:22:11 -0700 | [diff] [blame] | 125 | ifneq ($(ENABLE_SCHEDBOOST),) | 
|  | 126 | LOCAL_CFLAGS += -DUSE_SCHEDBOOST | 
|  | 127 | endif | 
| Elliott Hughes | 8fea1ed | 2015-07-24 18:48:31 -0700 | [diff] [blame] | 128 | LOCAL_CFLAGS += -Werror -Wall -Wextra -std=gnu90 | 
| Nick Kralevich | fc82dd9 | 2015-08-26 11:32:31 -0700 | [diff] [blame] | 129 | LOCAL_CLANG := true | 
|  | 130 | LOCAL_SANITIZE := integer | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 131 | include $(BUILD_STATIC_LIBRARY) | 
|  | 132 |  | 
|  | 133 | include $(CLEAR_VARS) | 
|  | 134 | LOCAL_MODULE := libcutils | 
| Ying Wang | c796ed9 | 2013-04-10 17:27:35 -0700 | [diff] [blame] | 135 | # TODO: remove liblog as whole static library, once we don't have prebuilt that requires | 
|  | 136 | # liblog symbols present in libcutils. | 
|  | 137 | LOCAL_WHOLE_STATIC_LIBRARIES := libcutils liblog | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 138 | LOCAL_SHARED_LIBRARIES := liblog | 
| Tim Murray | b769c8d | 2015-06-08 14:56:29 -0700 | [diff] [blame] | 139 | ifneq ($(ENABLE_CPUSETS),) | 
|  | 140 | LOCAL_CFLAGS += -DUSE_CPUSETS | 
|  | 141 | endif | 
| Todd Kjos | ed60788 | 2015-10-26 16:22:11 -0700 | [diff] [blame] | 142 | ifneq ($(ENABLE_SCHEDBOOST),) | 
|  | 143 | LOCAL_CFLAGS += -DUSE_SCHEDBOOST | 
|  | 144 | endif | 
| Elliott Hughes | 8fea1ed | 2015-07-24 18:48:31 -0700 | [diff] [blame] | 145 | LOCAL_CFLAGS += -Werror -Wall -Wextra | 
| David 'Digit' Turner | 7913bc0 | 2012-01-13 13:38:40 +0100 | [diff] [blame] | 146 | LOCAL_C_INCLUDES := $(libcutils_c_includes) | 
| Nick Kralevich | fc82dd9 | 2015-08-26 11:32:31 -0700 | [diff] [blame] | 147 | LOCAL_CLANG := true | 
|  | 148 | LOCAL_SANITIZE := integer | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 149 | include $(BUILD_SHARED_LIBRARY) | 
|  | 150 |  | 
| Duane Sand | d4a8098 | 2012-10-12 14:25:19 -0700 | [diff] [blame] | 151 | include $(call all-makefiles-under,$(LOCAL_PATH)) |