| 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 |  | 
|  | 19 | commonSources := \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 20 | hashmap.c \ | 
| Carl Shapiro | 93b0cb4 | 2010-06-03 17:05:15 -0700 | [diff] [blame] | 21 | atomic.c.arm \ | 
| Mathias Agopian | 1d3faaf | 2009-04-10 14:24:31 -0700 | [diff] [blame] | 22 | native_handle.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 23 | config_utils.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 24 | load_file.c \ | 
| Elliott Hughes | 2040031 | 2015-04-02 15:39:33 -0700 | [diff] [blame] | 25 | strlcpy.c \ | 
| Andy McFadden | cf63d5d | 2010-01-22 16:37:25 -0800 | [diff] [blame] | 26 | open_memstream.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 27 | strdup16to8.c \ | 
|  | 28 | strdup8to16.c \ | 
| Dima Zavin | abb7d58 | 2013-06-04 10:34:49 -0700 | [diff] [blame] | 29 | record_stream.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 30 | process_name.c \ | 
| San Mehat | 493dad9 | 2009-09-12 10:06:57 -0700 | [diff] [blame] | 31 | threads.c \ | 
| San Mehat | 10d469b | 2010-02-25 14:02:55 -0800 | [diff] [blame] | 32 | sched_policy.c \ | 
| Dima Zavin | 0fad7d0 | 2011-03-24 11:11:06 -0700 | [diff] [blame] | 33 | iosched_policy.c \ | 
| Jeff Sharkey | 885342a | 2012-08-14 21:00:22 -0700 | [diff] [blame] | 34 | str_parms.c \ | 
| Mark Salyzyn | 8b2c7de | 2015-04-01 07:42:01 -0700 | [diff] [blame] | 35 | fs_config.c | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 36 |  | 
|  | 37 | # some files must not be compiled when building against Mingw | 
|  | 38 | # they correspond to features not used by our host development tools | 
|  | 39 | # which are also hard or even impossible to port to native Win32 | 
| Raphael | f3cdf37 | 2009-05-26 13:23:23 -0700 | [diff] [blame] | 40 | WINDOWS_HOST_ONLY := | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 41 | ifeq ($(HOST_OS),windows) | 
|  | 42 | ifeq ($(strip $(USE_CYGWIN)),) | 
| Raphael | f3cdf37 | 2009-05-26 13:23:23 -0700 | [diff] [blame] | 43 | WINDOWS_HOST_ONLY := 1 | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 44 | endif | 
|  | 45 | endif | 
|  | 46 | # USE_MINGW is defined when we build against Mingw on Linux | 
|  | 47 | ifneq ($(strip $(USE_MINGW)),) | 
| Raphael | f3cdf37 | 2009-05-26 13:23:23 -0700 | [diff] [blame] | 48 | WINDOWS_HOST_ONLY := 1 | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 49 | endif | 
|  | 50 |  | 
| Jeff Sharkey | 0ee7d8c | 2013-09-20 17:58:54 -0700 | [diff] [blame] | 51 | ifneq ($(WINDOWS_HOST_ONLY),1) | 
|  | 52 | commonSources += \ | 
|  | 53 | fs.c \ | 
| Elliott Hughes | 0bff5bd | 2014-05-20 12:01:29 -0700 | [diff] [blame] | 54 | multiuser.c \ | 
| Mathieu Chartier | 0b9674f | 2014-06-03 15:28:26 -0700 | [diff] [blame] | 55 | socket_inaddr_any_server.c \ | 
|  | 56 | socket_local_client.c \ | 
|  | 57 | socket_local_server.c \ | 
|  | 58 | socket_loopback_client.c \ | 
|  | 59 | socket_loopback_server.c \ | 
|  | 60 | socket_network_client.c \ | 
|  | 61 | sockets.c \ | 
| Elliott Hughes | 0bff5bd | 2014-05-20 12:01:29 -0700 | [diff] [blame] | 62 |  | 
| Mathieu Chartier | e942d1f | 2014-06-03 18:12:29 -0700 | [diff] [blame] | 63 | commonHostSources += \ | 
| Richard Uhler | 7d451ab | 2015-03-20 16:59:40 -0700 | [diff] [blame] | 64 | ashmem-host.c \ | 
|  | 65 | trace-host.c | 
| Mathieu Chartier | e942d1f | 2014-06-03 18:12:29 -0700 | [diff] [blame] | 66 |  | 
| Jeff Sharkey | 0ee7d8c | 2013-09-20 17:58:54 -0700 | [diff] [blame] | 67 | endif | 
|  | 68 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 69 |  | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 70 | # Shared and static library for host | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 71 | # ======================================================== | 
|  | 72 | LOCAL_MODULE := libcutils | 
| Jesse Wilson | 7ab237f | 2010-08-18 18:17:55 -0700 | [diff] [blame] | 73 | LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 74 | LOCAL_STATIC_LIBRARIES := liblog | 
| Mark Salyzyn | 02a7c3a | 2014-05-05 08:49:13 -0700 | [diff] [blame] | 75 | ifneq ($(HOST_OS),windows) | 
| Elliott Hughes | 8fea1ed | 2015-07-24 18:48:31 -0700 | [diff] [blame] | 76 | LOCAL_CFLAGS += -Werror -Wall -Wextra | 
| Mark Salyzyn | 02a7c3a | 2014-05-05 08:49:13 -0700 | [diff] [blame] | 77 | endif | 
| Ian Rogers | 59ec765 | 2014-06-05 14:32:49 -0700 | [diff] [blame] | 78 | LOCAL_MULTILIB := both | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 79 | include $(BUILD_HOST_STATIC_LIBRARY) | 
|  | 80 |  | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 81 | include $(CLEAR_VARS) | 
|  | 82 | LOCAL_MODULE := libcutils | 
|  | 83 | LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c | 
|  | 84 | LOCAL_SHARED_LIBRARIES := liblog | 
|  | 85 | ifneq ($(HOST_OS),windows) | 
| Elliott Hughes | 8fea1ed | 2015-07-24 18:48:31 -0700 | [diff] [blame] | 86 | LOCAL_CFLAGS += -Werror -Wall -Wextra | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 87 | endif | 
|  | 88 | LOCAL_MULTILIB := both | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 89 | include $(BUILD_HOST_SHARED_LIBRARY) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 90 |  | 
| Jens Gulin | d3c8d5b | 2014-03-06 18:15:43 +0100 | [diff] [blame] | 91 |  | 
| Andrew Hsieh | 99e7f7a | 2012-03-01 23:58:50 -0800 | [diff] [blame] | 92 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 93 | # Shared and static library for target | 
|  | 94 | # ======================================================== | 
| David 'Digit' Turner | 7913bc0 | 2012-01-13 13:38:40 +0100 | [diff] [blame] | 95 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 96 | include $(CLEAR_VARS) | 
|  | 97 | LOCAL_MODULE := libcutils | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 98 | LOCAL_SRC_FILES := $(commonSources) \ | 
|  | 99 | android_reboot.c \ | 
|  | 100 | ashmem-dev.c \ | 
|  | 101 | debugger.c \ | 
|  | 102 | klog.c \ | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 103 | partition_utils.c \ | 
| Nick Kralevich | b39e3a8 | 2013-05-23 09:54:47 -0700 | [diff] [blame] | 104 | properties.c \ | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 105 | qtaguid.c \ | 
| Richard Uhler | 7d451ab | 2015-03-20 16:59:40 -0700 | [diff] [blame] | 106 | trace-dev.c \ | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 107 | uevent.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 108 |  | 
| Elliott Hughes | a492f37 | 2015-04-02 10:41:20 -0700 | [diff] [blame] | 109 | LOCAL_SRC_FILES_arm += arch-arm/memset32.S | 
|  | 110 | LOCAL_SRC_FILES_arm64 += arch-arm64/android_memset.S | 
| Duane Sand | 1ef9ccd | 2015-04-16 18:10:37 -0700 | [diff] [blame] | 111 |  | 
|  | 112 | LOCAL_SRC_FILES_mips += arch-mips/android_memset.c | 
|  | 113 | LOCAL_SRC_FILES_mips64 += arch-mips/android_memset.c | 
| Duane Sand | 734f50c | 2014-06-28 18:55:26 -0700 | [diff] [blame] | 114 |  | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 115 | LOCAL_SRC_FILES_x86 += \ | 
|  | 116 | arch-x86/android_memset16.S \ | 
|  | 117 | arch-x86/android_memset32.S \ | 
|  | 118 |  | 
|  | 119 | LOCAL_SRC_FILES_x86_64 += \ | 
| Varvara Rainchik | 458d125 | 2014-09-08 16:27:01 +0400 | [diff] [blame] | 120 | arch-x86_64/android_memset16.S \ | 
|  | 121 | arch-x86_64/android_memset32.S \ | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 122 |  | 
| Colin Cross | 65dd88b | 2014-01-22 19:06:04 -0800 | [diff] [blame] | 123 | LOCAL_C_INCLUDES := $(libcutils_c_includes) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 124 | LOCAL_STATIC_LIBRARIES := liblog | 
| Tim Murray | b769c8d | 2015-06-08 14:56:29 -0700 | [diff] [blame] | 125 | ifneq ($(ENABLE_CPUSETS),) | 
|  | 126 | LOCAL_CFLAGS += -DUSE_CPUSETS | 
|  | 127 | endif | 
| Elliott Hughes | 8fea1ed | 2015-07-24 18:48:31 -0700 | [diff] [blame] | 128 | LOCAL_CFLAGS += -Werror -Wall -Wextra -std=gnu90 | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 129 | include $(BUILD_STATIC_LIBRARY) | 
|  | 130 |  | 
|  | 131 | include $(CLEAR_VARS) | 
|  | 132 | LOCAL_MODULE := libcutils | 
| Ying Wang | c796ed9 | 2013-04-10 17:27:35 -0700 | [diff] [blame] | 133 | # TODO: remove liblog as whole static library, once we don't have prebuilt that requires | 
|  | 134 | # liblog symbols present in libcutils. | 
|  | 135 | LOCAL_WHOLE_STATIC_LIBRARIES := libcutils liblog | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 136 | LOCAL_SHARED_LIBRARIES := liblog | 
| Tim Murray | b769c8d | 2015-06-08 14:56:29 -0700 | [diff] [blame] | 137 | ifneq ($(ENABLE_CPUSETS),) | 
|  | 138 | LOCAL_CFLAGS += -DUSE_CPUSETS | 
|  | 139 | endif | 
| Elliott Hughes | 8fea1ed | 2015-07-24 18:48:31 -0700 | [diff] [blame] | 140 | LOCAL_CFLAGS += -Werror -Wall -Wextra | 
| David 'Digit' Turner | 7913bc0 | 2012-01-13 13:38:40 +0100 | [diff] [blame] | 141 | LOCAL_C_INCLUDES := $(libcutils_c_includes) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 142 | include $(BUILD_SHARED_LIBRARY) | 
|  | 143 |  | 
| Duane Sand | d4a8098 | 2012-10-12 14:25:19 -0700 | [diff] [blame] | 144 | include $(call all-makefiles-under,$(LOCAL_PATH)) |