blob: f9998e4ec49cbb2f633089ec62460c882fbf1497 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001# Copyright 2005 The Android Open Source Project
2#
3# Android.mk for adb
4#
5
6LOCAL_PATH:= $(call my-dir)
7
Dan Albert9113b472015-07-30 10:25:32 -07008adb_host_sanitize :=
9adb_target_sanitize :=
10
Dan Albert1ba1d7c2015-05-05 17:46:50 -070011adb_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
12
13ADB_COMMON_CFLAGS := \
Dan Albert23fee8f2015-05-20 18:56:10 -070014 -Wall -Wextra -Werror \
Dan Albert459df8f2015-07-08 13:50:42 -070015 -Wno-unused-parameter \
Dan Albert286bb6d2015-07-09 20:35:09 +000016 -Wno-missing-field-initializers \
Elliott Hughes6d929972015-10-27 13:40:35 -070017 -Wvla \
Dan Albert1ba1d7c2015-05-05 17:46:50 -070018 -DADB_REVISION='"$(adb_version)"' \
19
Josh Gaob7b1edf2015-11-11 17:56:12 -080020ADB_COMMON_linux_CFLAGS := \
Josh Gaob7b1edf2015-11-11 17:56:12 -080021 -Wexit-time-destructors \
22
23ADB_COMMON_darwin_CFLAGS := \
Josh Gaob7b1edf2015-11-11 17:56:12 -080024 -Wexit-time-destructors \
25
Spencer Lowe347c1d2015-08-02 18:13:54 -070026# Define windows.h and tchar.h Unicode preprocessor symbols so that
27# CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the
28# build if you accidentally pass char*. Fix by calling like:
Spencer Lowd21dc822015-11-12 15:20:15 -080029# std::wstring path_wide;
30# if (!android::base::UTF8ToWide(path_utf8, &path_wide)) { /* error handling */ }
31# CreateFileW(path_wide.c_str());
Spencer Lowe347c1d2015-08-02 18:13:54 -070032ADB_COMMON_windows_CFLAGS := \
33 -DUNICODE=1 -D_UNICODE=1 \
34
Dan Albert630b9af2014-11-24 23:34:35 -080035# libadb
36# =========================================================
37
38# Much of adb is duplicated in bootable/recovery/minadb and fastboot. Changes
39# made to adb rarely get ported to the other two, so the trees have diverged a
40# bit. We'd like to stop this because it is a maintenance nightmare, but the
41# divergence makes this difficult to do all at once. For now, we will start
42# small by moving common files into a static library. Hopefully some day we can
43# get enough of adb in here that we no longer need minadb. https://b/17626262
Dan Albertba3a2512015-02-18 17:47:33 -080044LIBADB_SRC_FILES := \
Dan Albertbac34742015-02-25 17:51:28 -080045 adb.cpp \
Dan Albertcc731cc2015-02-24 21:26:58 -080046 adb_io.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080047 adb_listeners.cpp \
Yabin Cuiaed3c612015-09-22 15:52:57 -070048 adb_trace.cpp \
Elliott Hughes58305772015-04-17 13:57:15 -070049 adb_utils.cpp \
Josh Gao3777d2e2016-02-16 17:34:53 -080050 fdevent.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080051 sockets.cpp \
Josh Gaocfb21412016-08-24 18:38:44 -070052 socket_spec.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080053 transport.cpp \
54 transport_local.cpp \
55 transport_usb.cpp \
Dan Albertba3a2512015-02-18 17:47:33 -080056
Elliott Hughes53daee62015-04-19 13:17:01 -070057LIBADB_TEST_SRCS := \
58 adb_io_test.cpp \
David Purselleaae97e2016-04-07 11:25:48 -070059 adb_listeners_test.cpp \
Elliott Hughes53daee62015-04-19 13:17:01 -070060 adb_utils_test.cpp \
Josh Gao022d4472016-02-10 14:49:00 -080061 fdevent_test.cpp \
Josh Gao10992152016-09-19 17:31:55 -070062 socket_spec_test.cpp \
Josh Gao022d4472016-02-10 14:49:00 -080063 socket_test.cpp \
Josh Gao3b3e10d2016-02-09 14:59:09 -080064 sysdeps_test.cpp \
Josh Gaof551ea02016-07-28 18:09:48 -070065 sysdeps/stat_test.cpp \
Elliott Hughes53daee62015-04-19 13:17:01 -070066 transport_test.cpp \
67
Dan Albertbf106472015-02-20 17:20:09 -080068LIBADB_CFLAGS := \
Dan Albert1ba1d7c2015-05-05 17:46:50 -070069 $(ADB_COMMON_CFLAGS) \
Dan Albertba3a2512015-02-18 17:47:33 -080070 -fvisibility=hidden \
Elliott Hughes4f1d7b52015-07-24 14:32:46 -070071
72LIBADB_linux_CFLAGS := \
Josh Gaob7b1edf2015-11-11 17:56:12 -080073 $(ADB_COMMON_linux_CFLAGS) \
74
75LIBADB_darwin_CFLAGS := \
76 $(ADB_COMMON_darwin_CFLAGS) \
Dan Albert630b9af2014-11-24 23:34:35 -080077
Dan Willemsen87a419c2015-08-13 14:43:34 -070078LIBADB_windows_CFLAGS := \
79 $(ADB_COMMON_windows_CFLAGS) \
Elliott Hughes4f1d7b52015-07-24 14:32:46 -070080
Dan Albertbac34742015-02-25 17:51:28 -080081LIBADB_darwin_SRC_FILES := \
David Pursellbfd95032016-02-22 14:27:23 -080082 sysdeps_unix.cpp \
Dan Albert7447dd02015-04-16 19:20:40 -070083 usb_osx.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080084
85LIBADB_linux_SRC_FILES := \
David Pursellbfd95032016-02-22 14:27:23 -080086 sysdeps_unix.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080087 usb_linux.cpp \
88
89LIBADB_windows_SRC_FILES := \
Elliott Hughesa2f2e562015-04-16 16:47:02 -070090 sysdeps_win32.cpp \
Josh Gaoa3577e12016-12-05 13:24:48 -080091 sysdeps/win32/errno.cpp \
Josh Gaof551ea02016-07-28 18:09:48 -070092 sysdeps/win32/stat.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080093 usb_windows.cpp \
Dan Albert94493762014-11-25 11:00:56 -080094
Spencer Lowe6ae5732015-09-08 17:13:04 -070095LIBADB_TEST_windows_SRCS := \
Josh Gaoa3577e12016-12-05 13:24:48 -080096 sysdeps/win32/errno_test.cpp \
Spencer Lowe6ae5732015-09-08 17:13:04 -070097 sysdeps_win32_test.cpp \
98
Dan Albert94493762014-11-25 11:00:56 -080099include $(CLEAR_VARS)
Elliott Hughes2acec912015-04-16 14:12:50 -0700100LOCAL_CLANG := true
Dan Albert94493762014-11-25 11:00:56 -0800101LOCAL_MODULE := libadbd
102LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=0
Dan Albert21c3eaf2015-02-18 17:20:44 -0800103LOCAL_SRC_FILES := \
104 $(LIBADB_SRC_FILES) \
Josh Gao3bd28792016-10-05 19:02:29 -0700105 adbd_auth.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800106 jdwp_service.cpp \
Elliott Hughes2acec912015-04-16 14:12:50 -0700107 usb_linux_client.cpp \
Dan Albert21c3eaf2015-02-18 17:20:44 -0800108
Dan Albert9113b472015-07-30 10:25:32 -0700109LOCAL_SANITIZE := $(adb_target_sanitize)
Elliott Hughes7b506092015-04-20 08:09:20 -0700110
Dan Alberte2462192015-03-19 13:25:27 -0700111# Even though we're building a static library (and thus there's no link step for
112# this to take effect), this adds the includes to our path.
Josh Gao47763c32016-08-05 15:47:57 -0700113LOCAL_STATIC_LIBRARIES := libcrypto_utils libcrypto libbase
Dan Alberte2462192015-03-19 13:25:27 -0700114
Dan Albert94493762014-11-25 11:00:56 -0800115include $(BUILD_STATIC_LIBRARY)
116
Dan Albert630b9af2014-11-24 23:34:35 -0800117include $(CLEAR_VARS)
118LOCAL_MODULE := libadb
Dan Willemsen87a419c2015-08-13 14:43:34 -0700119LOCAL_MODULE_HOST_OS := darwin linux windows
Dan Albert94493762014-11-25 11:00:56 -0800120LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
Dan Willemsen87a419c2015-08-13 14:43:34 -0700121LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
122LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaob7b1edf2015-11-11 17:56:12 -0800123LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
Dan Alberte1ca6232015-02-19 13:19:42 -0800124LOCAL_SRC_FILES := \
125 $(LIBADB_SRC_FILES) \
Dan Albertbac34742015-02-25 17:51:28 -0800126 adb_auth_host.cpp \
Dan Albert630b9af2014-11-24 23:34:35 -0800127
Dan Willemsen87a419c2015-08-13 14:43:34 -0700128LOCAL_SRC_FILES_darwin := $(LIBADB_darwin_SRC_FILES)
129LOCAL_SRC_FILES_linux := $(LIBADB_linux_SRC_FILES)
130LOCAL_SRC_FILES_windows := $(LIBADB_windows_SRC_FILES)
131
Dan Albert9113b472015-07-30 10:25:32 -0700132LOCAL_SANITIZE := $(adb_host_sanitize)
Elliott Hughes7b506092015-04-20 08:09:20 -0700133
Dan Alberte1ca6232015-02-19 13:19:42 -0800134# Even though we're building a static library (and thus there's no link step for
Dan Alberte2462192015-03-19 13:25:27 -0700135# this to take effect), this adds the includes to our path.
Josh Gao47763c32016-08-05 15:47:57 -0700136LOCAL_STATIC_LIBRARIES := libcrypto_utils libcrypto libbase
Dan Alberte1ca6232015-02-19 13:19:42 -0800137
Dan Willemsen87a419c2015-08-13 14:43:34 -0700138LOCAL_C_INCLUDES_windows := development/host/windows/usb/api/
Dan Willemsen66680c52015-09-03 20:29:56 -0700139LOCAL_MULTILIB := first
Dan Albert88cf1c82015-02-24 14:08:03 -0800140
Dan Albert630b9af2014-11-24 23:34:35 -0800141include $(BUILD_HOST_STATIC_LIBRARY)
142
Dan Albert055f1aa2015-02-20 17:24:58 -0800143include $(CLEAR_VARS)
Elliott Hughes53daee62015-04-19 13:17:01 -0700144LOCAL_CLANG := true
Dan Albert055f1aa2015-02-20 17:24:58 -0800145LOCAL_MODULE := adbd_test
146LOCAL_CFLAGS := -DADB_HOST=0 $(LIBADB_CFLAGS)
Yabin Cuibec02fc2015-08-28 15:44:27 -0700147LOCAL_SRC_FILES := \
148 $(LIBADB_TEST_SRCS) \
149 $(LIBADB_TEST_linux_SRCS) \
David Pursell0955c662015-08-31 10:42:13 -0700150 shell_service.cpp \
David Pursellb9e2e842015-08-31 15:36:18 -0700151 shell_service_protocol.cpp \
152 shell_service_protocol_test.cpp \
David Pursell0955c662015-08-31 10:42:13 -0700153 shell_service_test.cpp \
Yabin Cuibec02fc2015-08-28 15:44:27 -0700154
Dan Albert9113b472015-07-30 10:25:32 -0700155LOCAL_SANITIZE := $(adb_target_sanitize)
Josh Gao47763c32016-08-05 15:47:57 -0700156LOCAL_STATIC_LIBRARIES := libadbd libcrypto_utils libcrypto
Dimitry Ivanov01f21da2016-02-12 18:40:29 -0800157LOCAL_SHARED_LIBRARIES := liblog libbase libcutils
Dan Albert055f1aa2015-02-20 17:24:58 -0800158include $(BUILD_NATIVE_TEST)
159
Elliott Hughes1b708d32015-12-11 19:07:01 -0800160# libdiagnose_usb
161# =========================================================
162
163include $(CLEAR_VARS)
164LOCAL_MODULE := libdiagnose_usb
165LOCAL_MODULE_HOST_OS := darwin linux windows
166LOCAL_CFLAGS := $(LIBADB_CFLAGS)
167LOCAL_SRC_FILES := diagnose_usb.cpp
168# Even though we're building a static library (and thus there's no link step for
169# this to take effect), this adds the includes to our path.
170LOCAL_STATIC_LIBRARIES := libbase
171include $(BUILD_HOST_STATIC_LIBRARY)
172
Spencer Lowcf168a82015-05-24 15:36:28 -0700173# adb_test
174# =========================================================
175
Dan Albert055f1aa2015-02-20 17:24:58 -0800176include $(CLEAR_VARS)
Dan Albert055f1aa2015-02-20 17:24:58 -0800177LOCAL_MODULE := adb_test
Spencer Lowebf770f2015-09-07 23:39:02 -0700178LOCAL_MODULE_HOST_OS := darwin linux windows
Dan Albert055f1aa2015-02-20 17:24:58 -0800179LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS)
Dan Willemsen87a419c2015-08-13 14:43:34 -0700180LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
181LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaob7b1edf2015-11-11 17:56:12 -0800182LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
David Pursellb9e2e842015-08-31 15:36:18 -0700183LOCAL_SRC_FILES := \
184 $(LIBADB_TEST_SRCS) \
Felipe Leme698e0652016-07-19 17:07:22 -0700185 adb_client.cpp \
186 bugreport.cpp \
187 bugreport_test.cpp \
Felipe Leme6f5080f2016-07-26 12:23:40 -0700188 line_printer.cpp \
David Pursellb9e2e842015-08-31 15:36:18 -0700189 services.cpp \
190 shell_service_protocol.cpp \
191 shell_service_protocol_test.cpp \
192
David Pursellb404dec2015-09-11 16:06:59 -0700193LOCAL_SRC_FILES_linux := $(LIBADB_TEST_linux_SRCS)
Dan Willemsen87a419c2015-08-13 14:43:34 -0700194LOCAL_SRC_FILES_darwin := $(LIBADB_TEST_darwin_SRCS)
Spencer Lowe6ae5732015-09-08 17:13:04 -0700195LOCAL_SRC_FILES_windows := $(LIBADB_TEST_windows_SRCS)
Dan Albert9113b472015-07-30 10:25:32 -0700196LOCAL_SANITIZE := $(adb_host_sanitize)
Yabin Cuicb992d92015-09-08 18:27:10 -0700197LOCAL_SHARED_LIBRARIES := libbase
Dan Albert055f1aa2015-02-20 17:24:58 -0800198LOCAL_STATIC_LIBRARIES := \
199 libadb \
Josh Gao47763c32016-08-05 15:47:57 -0700200 libcrypto_utils \
201 libcrypto \
Dan Albert055f1aa2015-02-20 17:24:58 -0800202 libcutils \
Elliott Hughes1b708d32015-12-11 19:07:01 -0800203 libdiagnose_usb \
Felipe Leme698e0652016-07-19 17:07:22 -0700204 libgmock_host \
Dan Albert055f1aa2015-02-20 17:24:58 -0800205
Spencer Lowe6ae5732015-09-08 17:13:04 -0700206# Set entrypoint to wmain from sysdeps_win32.cpp instead of main
207LOCAL_LDFLAGS_windows := -municode
Dan Willemsen87a419c2015-08-13 14:43:34 -0700208LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
209LOCAL_LDLIBS_darwin := -framework CoreFoundation -framework IOKit
210LOCAL_LDLIBS_windows := -lws2_32 -luserenv
211LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
Dan Albert055f1aa2015-02-20 17:24:58 -0800212
Dan Willemsen1e20e0a2015-12-21 16:14:31 -0800213LOCAL_MULTILIB := first
214
Spencer Lowcf168a82015-05-24 15:36:28 -0700215include $(BUILD_HOST_NATIVE_TEST)
216
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800217# adb host tool
218# =========================================================
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800219include $(CLEAR_VARS)
220
Dan Willemsen87a419c2015-08-13 14:43:34 -0700221LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800222
Dan Willemsen87a419c2015-08-13 14:43:34 -0700223LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800224
Dan Willemsen87a419c2015-08-13 14:43:34 -0700225# Use wmain instead of main
226LOCAL_LDFLAGS_windows := -municode
227LOCAL_LDLIBS_windows := -lws2_32 -lgdi32
228LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
229LOCAL_REQUIRED_MODULES_windows := AdbWinApi AdbWinUsbApi
Dan Albert9697ce52015-02-20 17:28:44 -0800230
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800231LOCAL_SRC_FILES := \
Elliott Hughesb708d162015-10-27 16:03:15 -0700232 adb_client.cpp \
Felipe Leme698e0652016-07-19 17:07:22 -0700233 bugreport.cpp \
Dan Albertc89e0cc2015-05-08 16:13:53 -0700234 client/main.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800235 console.cpp \
236 commandline.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800237 file_sync_client.cpp \
Elliott Hughesb708d162015-10-27 16:03:15 -0700238 line_printer.cpp \
239 services.cpp \
David Pursellb9e2e842015-08-31 15:36:18 -0700240 shell_service_protocol.cpp \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800241
Dan Albert7fd821e2015-02-24 22:38:21 -0800242LOCAL_CFLAGS += \
Dan Albert1ba1d7c2015-05-05 17:46:50 -0700243 $(ADB_COMMON_CFLAGS) \
Dan Albert7fd821e2015-02-24 22:38:21 -0800244 -D_GNU_SOURCE \
245 -DADB_HOST=1 \
246
Dan Willemsen87a419c2015-08-13 14:43:34 -0700247LOCAL_CFLAGS_windows := \
248 $(ADB_COMMON_windows_CFLAGS)
249
Josh Gaob7b1edf2015-11-11 17:56:12 -0800250LOCAL_CFLAGS_linux := \
251 $(ADB_COMMON_linux_CFLAGS) \
252
253LOCAL_CFLAGS_darwin := \
254 $(ADB_COMMON_darwin_CFLAGS) \
255 -Wno-sizeof-pointer-memaccess -Wno-unused-parameter \
256
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800257LOCAL_MODULE := adb
Kenny Rootd5d6d972012-09-26 09:58:07 -0700258LOCAL_MODULE_TAGS := debug
Dan Willemsen87a419c2015-08-13 14:43:34 -0700259LOCAL_MODULE_HOST_OS := darwin linux windows
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800260
Dan Albert9113b472015-07-30 10:25:32 -0700261LOCAL_SANITIZE := $(adb_host_sanitize)
Dan Albert630b9af2014-11-24 23:34:35 -0800262LOCAL_STATIC_LIBRARIES := \
263 libadb \
Elliott Hughes2baae3a2015-04-17 10:59:34 -0700264 libbase \
Josh Gao47763c32016-08-05 15:47:57 -0700265 libcrypto_utils \
266 libcrypto \
Elliott Hughes1b708d32015-12-11 19:07:01 -0800267 libdiagnose_usb \
Elliott Hughes9309ecb2015-04-27 14:20:17 -0700268 liblog \
Dan Albert630b9af2014-11-24 23:34:35 -0800269
Josh Gaoa629e2e2015-11-13 17:55:45 -0800270# Don't use libcutils on Windows.
271LOCAL_STATIC_LIBRARIES_darwin := libcutils
272LOCAL_STATIC_LIBRARIES_linux := libcutils
273
Dan Willemsen87a419c2015-08-13 14:43:34 -0700274LOCAL_CXX_STL := libc++_static
Colin Cross55bf5f02015-04-16 16:21:44 -0700275
276# Don't add anything here, we don't want additional shared dependencies
277# on the host adb tool, and shared libraries that link against libc++
278# will violate ODR
279LOCAL_SHARED_LIBRARIES :=
280
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800281include $(BUILD_HOST_EXECUTABLE)
282
Ying Wang71edfc82016-02-29 19:27:06 -0800283$(call dist-for-goals,dist_files sdk win_sdk,$(LOCAL_BUILT_MODULE))
284ifdef HOST_CROSS_OS
285# Archive adb.exe for win_sdk build.
286$(call dist-for-goals,win_sdk,$(ALL_MODULES.host_cross_adb.BUILT))
287endif
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800288
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800289
290# adbd device daemon
291# =========================================================
292
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800293include $(CLEAR_VARS)
294
Elliott Hughes53daee62015-04-19 13:17:01 -0700295LOCAL_CLANG := true
Dan Albert9697ce52015-02-20 17:28:44 -0800296
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800297LOCAL_SRC_FILES := \
Dan Albertc89e0cc2015-05-08 16:13:53 -0700298 daemon/main.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800299 services.cpp \
300 file_sync_service.cpp \
301 framebuffer_service.cpp \
302 remount_service.cpp \
303 set_verity_enable_state_service.cpp \
David Pursell80f67022015-08-28 15:08:49 -0700304 shell_service.cpp \
David Pursellb9e2e842015-08-31 15:36:18 -0700305 shell_service_protocol.cpp \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800306
Christopher Ferris51448eb2014-09-03 19:48:48 -0700307LOCAL_CFLAGS := \
Dan Albert1ba1d7c2015-05-05 17:46:50 -0700308 $(ADB_COMMON_CFLAGS) \
Josh Gaob7b1edf2015-11-11 17:56:12 -0800309 $(ADB_COMMON_linux_CFLAGS) \
Dan Albertbac34742015-02-25 17:51:28 -0800310 -DADB_HOST=0 \
311 -D_GNU_SOURCE \
Dan Albertbac34742015-02-25 17:51:28 -0800312 -Wno-deprecated-declarations \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800313
Elliott Hughes5cba5042015-06-17 15:23:42 -0700314LOCAL_CFLAGS += -DALLOW_ADBD_NO_AUTH=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0)
Nick Kralevich5890fe32012-01-19 13:11:35 -0800315
Elliott Hughesec7a6672015-03-16 21:58:32 +0000316ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
Paul Lawrenceec900bb2014-10-09 14:22:49 +0000317LOCAL_CFLAGS += -DALLOW_ADBD_DISABLE_VERITY=1
Elliott Hughes5cba5042015-06-17 15:23:42 -0700318LOCAL_CFLAGS += -DALLOW_ADBD_ROOT=1
Paul Lawrenceec900bb2014-10-09 14:22:49 +0000319endif
320
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800321LOCAL_MODULE := adbd
322
323LOCAL_FORCE_STATIC_EXECUTABLE := true
324LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
325LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
326
Dan Albert9113b472015-07-30 10:25:32 -0700327LOCAL_SANITIZE := $(adb_target_sanitize)
Josh Gao809607a2016-06-15 18:33:11 -0700328LOCAL_STRIP_MODULE := keep_symbols
Dan Albert630b9af2014-11-24 23:34:35 -0800329LOCAL_STATIC_LIBRARIES := \
Dan Albert94493762014-11-25 11:00:56 -0800330 libadbd \
Tao Bao175b7bb2015-03-29 11:22:34 -0700331 libbase \
Dan Albert030b76f2015-01-26 17:13:54 -0800332 libfs_mgr \
Sami Tolvanen8ad80762015-10-20 13:24:24 +0100333 libfec \
334 libfec_rs \
William Robertsbd2d9612015-08-04 14:23:04 -0700335 libselinux \
Dan Albert630b9af2014-11-24 23:34:35 -0800336 liblog \
Dan Albert030b76f2015-01-26 17:13:54 -0800337 libext4_utils_static \
Sami Tolvanen8ad80762015-10-20 13:24:24 +0100338 libsquashfs_utils \
Dan Alberte2462192015-03-19 13:25:27 -0700339 libcutils \
340 libbase \
Josh Gao47763c32016-08-05 15:47:57 -0700341 libcrypto_utils \
342 libcrypto \
Josh Gao809607a2016-06-15 18:33:11 -0700343 libminijail \
344 libdebuggerd_client \
Paul Lawrenceec900bb2014-10-09 14:22:49 +0000345
Jeff Brown29e1e732011-07-11 22:12:32 -0700346include $(BUILD_EXECUTABLE)