| 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 \ | 
| Andy McFadden | cf63d5d | 2010-01-22 16:37:25 -0800 | [diff] [blame] | 25 | 	open_memstream.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 26 | 	strdup16to8.c \ | 
 | 27 | 	strdup8to16.c \ | 
| Dima Zavin | abb7d58 | 2013-06-04 10:34:49 -0700 | [diff] [blame] | 28 | 	record_stream.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 29 | 	process_name.c \ | 
| San Mehat | 493dad9 | 2009-09-12 10:06:57 -0700 | [diff] [blame] | 30 | 	threads.c \ | 
| San Mehat | 10d469b | 2010-02-25 14:02:55 -0800 | [diff] [blame] | 31 | 	sched_policy.c \ | 
| Dima Zavin | 0fad7d0 | 2011-03-24 11:11:06 -0700 | [diff] [blame] | 32 | 	iosched_policy.c \ | 
| Jeff Sharkey | 885342a | 2012-08-14 21:00:22 -0700 | [diff] [blame] | 33 | 	str_parms.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 34 |  | 
 | 35 | # some files must not be compiled when building against Mingw | 
 | 36 | # they correspond to features not used by our host development tools | 
 | 37 | # which are also hard or even impossible to port to native Win32 | 
| Raphael | f3cdf37 | 2009-05-26 13:23:23 -0700 | [diff] [blame] | 38 | WINDOWS_HOST_ONLY := | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 39 | ifeq ($(HOST_OS),windows) | 
 | 40 |     ifeq ($(strip $(USE_CYGWIN)),) | 
| Raphael | f3cdf37 | 2009-05-26 13:23:23 -0700 | [diff] [blame] | 41 |         WINDOWS_HOST_ONLY := 1 | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 42 |     endif | 
 | 43 | endif | 
 | 44 | # USE_MINGW is defined when we build against Mingw on Linux | 
 | 45 | ifneq ($(strip $(USE_MINGW)),) | 
| Raphael | f3cdf37 | 2009-05-26 13:23:23 -0700 | [diff] [blame] | 46 |     WINDOWS_HOST_ONLY := 1 | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 47 | endif | 
 | 48 |  | 
| Jeff Sharkey | 0ee7d8c | 2013-09-20 17:58:54 -0700 | [diff] [blame] | 49 | ifneq ($(WINDOWS_HOST_ONLY),1) | 
 | 50 |     commonSources += \ | 
 | 51 |         fs.c \ | 
| Elliott Hughes | 0bff5bd | 2014-05-20 12:01:29 -0700 | [diff] [blame] | 52 |         multiuser.c \ | 
| Mathieu Chartier | 0b9674f | 2014-06-03 15:28:26 -0700 | [diff] [blame] | 53 |         socket_inaddr_any_server.c \ | 
 | 54 |         socket_local_client.c \ | 
 | 55 |         socket_local_server.c \ | 
 | 56 |         socket_loopback_client.c \ | 
 | 57 |         socket_loopback_server.c \ | 
 | 58 |         socket_network_client.c \ | 
 | 59 |         sockets.c \ | 
| Elliott Hughes | 0bff5bd | 2014-05-20 12:01:29 -0700 | [diff] [blame] | 60 |  | 
| Mathieu Chartier | e942d1f | 2014-06-03 18:12:29 -0700 | [diff] [blame] | 61 |     commonHostSources += \ | 
 | 62 |         ashmem-host.c | 
 | 63 |  | 
| Jeff Sharkey | 0ee7d8c | 2013-09-20 17:58:54 -0700 | [diff] [blame] | 64 | endif | 
 | 65 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 66 |  | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 67 | # Shared and static library for host | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 68 | # ======================================================== | 
 | 69 | LOCAL_MODULE := libcutils | 
| Jesse Wilson | 7ab237f | 2010-08-18 18:17:55 -0700 | [diff] [blame] | 70 | LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 71 | LOCAL_STATIC_LIBRARIES := liblog | 
| Mark Salyzyn | 02a7c3a | 2014-05-05 08:49:13 -0700 | [diff] [blame] | 72 | ifneq ($(HOST_OS),windows) | 
 | 73 | LOCAL_CFLAGS += -Werror | 
 | 74 | endif | 
| Ian Rogers | 59ec765 | 2014-06-05 14:32:49 -0700 | [diff] [blame] | 75 | LOCAL_MULTILIB := both | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 76 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 77 | include $(BUILD_HOST_STATIC_LIBRARY) | 
 | 78 |  | 
| Richard Uhler | acb31ba | 2015-03-24 14:46:01 -0700 | [diff] [blame] | 79 | include $(CLEAR_VARS) | 
 | 80 | LOCAL_MODULE := libcutils | 
 | 81 | LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c | 
 | 82 | LOCAL_SHARED_LIBRARIES := liblog | 
 | 83 | ifneq ($(HOST_OS),windows) | 
 | 84 | LOCAL_CFLAGS += -Werror | 
 | 85 | endif | 
 | 86 | LOCAL_MULTILIB := both | 
 | 87 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | 
 | 88 | include $(BUILD_HOST_SHARED_LIBRARY) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 89 |  | 
| Jens Gulin | d3c8d5b | 2014-03-06 18:15:43 +0100 | [diff] [blame] | 90 | # Tests for host | 
 | 91 | # ======================================================== | 
 | 92 | include $(CLEAR_VARS) | 
 | 93 | LOCAL_MODULE := tst_str_parms | 
| Mark Salyzyn | 02a7c3a | 2014-05-05 08:49:13 -0700 | [diff] [blame] | 94 | LOCAL_CFLAGS += -DTEST_STR_PARMS | 
 | 95 | ifneq ($(HOST_OS),windows) | 
 | 96 | LOCAL_CFLAGS += -Werror | 
 | 97 | endif | 
| Jens Gulin | d3c8d5b | 2014-03-06 18:15:43 +0100 | [diff] [blame] | 98 | LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c | 
 | 99 | LOCAL_STATIC_LIBRARIES := liblog | 
 | 100 | LOCAL_MODULE_TAGS := optional | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 101 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | 
| Jens Gulin | d3c8d5b | 2014-03-06 18:15:43 +0100 | [diff] [blame] | 102 | include $(BUILD_HOST_EXECUTABLE) | 
 | 103 |  | 
| Andrew Hsieh | 99e7f7a | 2012-03-01 23:58:50 -0800 | [diff] [blame] | 104 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 105 | # Shared and static library for target | 
 | 106 | # ======================================================== | 
| David 'Digit' Turner | 7913bc0 | 2012-01-13 13:38:40 +0100 | [diff] [blame] | 107 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 108 | include $(CLEAR_VARS) | 
 | 109 | LOCAL_MODULE := libcutils | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 110 | LOCAL_SRC_FILES := $(commonSources) \ | 
 | 111 |         android_reboot.c \ | 
 | 112 |         ashmem-dev.c \ | 
 | 113 |         debugger.c \ | 
 | 114 |         klog.c \ | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 115 |         memory.c \ | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 116 |         partition_utils.c \ | 
| Nick Kralevich | b39e3a8 | 2013-05-23 09:54:47 -0700 | [diff] [blame] | 117 |         properties.c \ | 
| Jeff Brown | 053b865 | 2012-06-06 16:25:03 -0700 | [diff] [blame] | 118 |         qtaguid.c \ | 
| Alex Ray | 0a34643 | 2012-11-14 17:25:28 -0800 | [diff] [blame] | 119 |         trace.c \ | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 120 |         uevent.c \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 121 |  | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 122 | LOCAL_SRC_FILES_arm += \ | 
 | 123 |         arch-arm/memset32.S \ | 
 | 124 |  | 
| Chih-Hung Hsieh | 60c57da | 2014-10-06 13:27:20 -0700 | [diff] [blame] | 125 | # arch-arm/memset32.S does not compile with Clang. | 
 | 126 | LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as | 
 | 127 |  | 
| Christopher Ferris | d660d89 | 2014-06-20 10:28:28 -0700 | [diff] [blame] | 128 | LOCAL_SRC_FILES_arm64 += \ | 
 | 129 |         arch-arm64/android_memset.S \ | 
 | 130 |  | 
| Duane Sand | 734f50c | 2014-06-28 18:55:26 -0700 | [diff] [blame] | 131 | ifndef ARCH_MIPS_REV6 | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 132 | LOCAL_SRC_FILES_mips += \ | 
 | 133 |         arch-mips/android_memset.c \ | 
 | 134 |  | 
| Duane Sand | 734f50c | 2014-06-28 18:55:26 -0700 | [diff] [blame] | 135 | LOCAL_CFLAGS_mips += -DHAVE_MEMSET16 -DHAVE_MEMSET32 | 
 | 136 | endif | 
 | 137 |  | 
 | 138 | # TODO: switch mips64 back to using arch-mips/android_memset.c | 
 | 139 | LOCAL_SRC_FILES_mips64 += \ | 
 | 140 | #       arch-mips/android_memset.c \ | 
 | 141 |  | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 142 | LOCAL_SRC_FILES_x86 += \ | 
 | 143 |         arch-x86/android_memset16.S \ | 
 | 144 |         arch-x86/android_memset32.S \ | 
 | 145 |  | 
 | 146 | LOCAL_SRC_FILES_x86_64 += \ | 
| Varvara Rainchik | 458d125 | 2014-09-08 16:27:01 +0400 | [diff] [blame] | 147 |         arch-x86_64/android_memset16.S \ | 
 | 148 |         arch-x86_64/android_memset32.S \ | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 149 |  | 
 | 150 | LOCAL_CFLAGS_arm += -DHAVE_MEMSET16 -DHAVE_MEMSET32 | 
| Christopher Ferris | d660d89 | 2014-06-20 10:28:28 -0700 | [diff] [blame] | 151 | LOCAL_CFLAGS_arm64 += -DHAVE_MEMSET16 -DHAVE_MEMSET32 | 
| Duane Sand | 734f50c | 2014-06-28 18:55:26 -0700 | [diff] [blame] | 152 | #LOCAL_CFLAGS_mips64 += -DHAVE_MEMSET16 -DHAVE_MEMSET32 | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 153 | LOCAL_CFLAGS_x86 += -DHAVE_MEMSET16 -DHAVE_MEMSET32 | 
 | 154 | LOCAL_CFLAGS_x86_64 += -DHAVE_MEMSET16 -DHAVE_MEMSET32 | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 155 |  | 
| Colin Cross | 65dd88b | 2014-01-22 19:06:04 -0800 | [diff] [blame] | 156 | LOCAL_C_INCLUDES := $(libcutils_c_includes) | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 157 | LOCAL_STATIC_LIBRARIES := liblog | 
| Elliott Hughes | e9ca709 | 2014-11-17 11:16:59 -0800 | [diff] [blame] | 158 | LOCAL_CFLAGS += -Werror -std=gnu90 | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 159 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 160 | include $(BUILD_STATIC_LIBRARY) | 
 | 161 |  | 
 | 162 | include $(CLEAR_VARS) | 
 | 163 | LOCAL_MODULE := libcutils | 
| Ying Wang | c796ed9 | 2013-04-10 17:27:35 -0700 | [diff] [blame] | 164 | # TODO: remove liblog as whole static library, once we don't have prebuilt that requires | 
 | 165 | # liblog symbols present in libcutils. | 
 | 166 | LOCAL_WHOLE_STATIC_LIBRARIES := libcutils liblog | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 167 | LOCAL_SHARED_LIBRARIES := liblog | 
| Elliott Hughes | e9ca709 | 2014-11-17 11:16:59 -0800 | [diff] [blame] | 168 | LOCAL_CFLAGS += -Werror | 
| David 'Digit' Turner | 7913bc0 | 2012-01-13 13:38:40 +0100 | [diff] [blame] | 169 | LOCAL_C_INCLUDES := $(libcutils_c_includes) | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 170 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 171 | include $(BUILD_SHARED_LIBRARY) | 
 | 172 |  | 
| Dima Zavin | 0fad7d0 | 2011-03-24 11:11:06 -0700 | [diff] [blame] | 173 | include $(CLEAR_VARS) | 
 | 174 | LOCAL_MODULE := tst_str_parms | 
| Mark Salyzyn | 1271716 | 2014-04-29 15:49:14 -0700 | [diff] [blame] | 175 | LOCAL_CFLAGS += -DTEST_STR_PARMS -Werror | 
| Dima Zavin | 0fad7d0 | 2011-03-24 11:11:06 -0700 | [diff] [blame] | 176 | LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c | 
| Dima Zavin | 14fc0c2 | 2011-04-27 22:26:23 -0700 | [diff] [blame] | 177 | LOCAL_SHARED_LIBRARIES := liblog | 
| Dima Zavin | 0fad7d0 | 2011-03-24 11:11:06 -0700 | [diff] [blame] | 178 | LOCAL_MODULE_TAGS := optional | 
| Henrik Smiding | 86a1600 | 2014-05-16 13:26:08 +0200 | [diff] [blame] | 179 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | 
| Dima Zavin | 14fc0c2 | 2011-04-27 22:26:23 -0700 | [diff] [blame] | 180 | include $(BUILD_EXECUTABLE) | 
| Duane Sand | d4a8098 | 2012-10-12 14:25:19 -0700 | [diff] [blame] | 181 |  | 
 | 182 | include $(call all-makefiles-under,$(LOCAL_PATH)) |