blob: d6292235520fd25d194d7c0bad0ae7f87d361719 [file] [log] [blame]
The Android Open Source Project9ca14dc2009-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 Albertfd0be892015-07-30 10:25:32 -07008adb_host_sanitize :=
9adb_target_sanitize :=
10
Dan Alberta8285fb2015-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 Albertc6d3a242015-05-20 18:56:10 -070014 -Wall -Wextra -Werror \
Dan Albert7d8fc462015-07-08 13:50:42 -070015 -Wno-unused-parameter \
Dan Albert3d978e62015-07-09 20:35:09 +000016 -Wno-missing-field-initializers \
Elliott Hughes6c73bfc2015-10-27 13:40:35 -070017 -Wvla \
Dan Alberta8285fb2015-05-05 17:46:50 -070018 -DADB_REVISION='"$(adb_version)"' \
19
Josh Gaoe3a87d02015-11-11 17:56:12 -080020ADB_COMMON_linux_CFLAGS := \
21 -std=c++14 \
22 -Wexit-time-destructors \
23
24ADB_COMMON_darwin_CFLAGS := \
25 -std=c++14 \
26 -Wexit-time-destructors \
27
Spencer Lowcc467f12015-08-02 18:13:54 -070028# Define windows.h and tchar.h Unicode preprocessor symbols so that
29# CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the
30# build if you accidentally pass char*. Fix by calling like:
Spencer Low50f5bf12015-11-12 15:20:15 -080031# std::wstring path_wide;
32# if (!android::base::UTF8ToWide(path_utf8, &path_wide)) { /* error handling */ }
33# CreateFileW(path_wide.c_str());
Spencer Lowcc467f12015-08-02 18:13:54 -070034ADB_COMMON_windows_CFLAGS := \
35 -DUNICODE=1 -D_UNICODE=1 \
36
Dan Albertbbbbea62014-11-24 23:34:35 -080037# libadb
38# =========================================================
39
40# Much of adb is duplicated in bootable/recovery/minadb and fastboot. Changes
41# made to adb rarely get ported to the other two, so the trees have diverged a
42# bit. We'd like to stop this because it is a maintenance nightmare, but the
43# divergence makes this difficult to do all at once. For now, we will start
44# small by moving common files into a static library. Hopefully some day we can
45# get enough of adb in here that we no longer need minadb. https://b/17626262
Dan Albert056ad0e2015-02-18 17:47:33 -080046LIBADB_SRC_FILES := \
Dan Albertf30d73c2015-02-25 17:51:28 -080047 adb.cpp \
48 adb_auth.cpp \
Dan Albert66a91b02015-02-24 21:26:58 -080049 adb_io.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -080050 adb_listeners.cpp \
Yabin Cui19bec5b2015-09-22 15:52:57 -070051 adb_trace.cpp \
Elliott Hughes38104452015-04-17 13:57:15 -070052 adb_utils.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -080053 sockets.cpp \
54 transport.cpp \
55 transport_local.cpp \
56 transport_usb.cpp \
Dan Albert056ad0e2015-02-18 17:47:33 -080057
Elliott Hughesdf5bb432015-04-19 13:17:01 -070058LIBADB_TEST_SRCS := \
59 adb_io_test.cpp \
60 adb_utils_test.cpp \
61 transport_test.cpp \
62
Dan Albert357bd492015-02-20 17:20:09 -080063LIBADB_CFLAGS := \
Dan Alberta8285fb2015-05-05 17:46:50 -070064 $(ADB_COMMON_CFLAGS) \
Dan Albert056ad0e2015-02-18 17:47:33 -080065 -fvisibility=hidden \
Elliott Hughesbb4fe4a2015-07-24 14:32:46 -070066
67LIBADB_linux_CFLAGS := \
Josh Gaoe3a87d02015-11-11 17:56:12 -080068 $(ADB_COMMON_linux_CFLAGS) \
69
70LIBADB_darwin_CFLAGS := \
71 $(ADB_COMMON_darwin_CFLAGS) \
Dan Albertbbbbea62014-11-24 23:34:35 -080072
Dan Willemsen1cc079a2015-08-13 14:43:34 -070073LIBADB_windows_CFLAGS := \
74 $(ADB_COMMON_windows_CFLAGS) \
Elliott Hughesbb4fe4a2015-07-24 14:32:46 -070075
Dan Albertf30d73c2015-02-25 17:51:28 -080076LIBADB_darwin_SRC_FILES := \
77 fdevent.cpp \
Elliott Hughes7f963e12015-04-16 13:24:58 -070078 get_my_path_darwin.cpp \
Dan Albert25896062015-04-16 19:20:40 -070079 usb_osx.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -080080
81LIBADB_linux_SRC_FILES := \
82 fdevent.cpp \
83 get_my_path_linux.cpp \
84 usb_linux.cpp \
85
86LIBADB_windows_SRC_FILES := \
Elliott Hughes6a096932015-04-16 16:47:02 -070087 sysdeps_win32.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -080088 usb_windows.cpp \
Dan Albertdfef94a2014-11-25 11:00:56 -080089
Yabin Cui7c92f0a2015-08-28 15:44:27 -070090LIBADB_TEST_linux_SRCS := \
91 fdevent_test.cpp \
Yabin Cui2ce9d562015-09-15 16:27:09 -070092 socket_test.cpp \
Yabin Cui7c92f0a2015-08-28 15:44:27 -070093
94LIBADB_TEST_darwin_SRCS := \
95 fdevent_test.cpp \
Yabin Cui2ce9d562015-09-15 16:27:09 -070096 socket_test.cpp \
Yabin Cui7c92f0a2015-08-28 15:44:27 -070097
Spencer Low50740f52015-09-08 17:13:04 -070098LIBADB_TEST_windows_SRCS := \
99 sysdeps_win32_test.cpp \
100
Dan Albertdfef94a2014-11-25 11:00:56 -0800101include $(CLEAR_VARS)
Elliott Hughes392692c2015-04-16 14:12:50 -0700102LOCAL_CLANG := true
Dan Albertdfef94a2014-11-25 11:00:56 -0800103LOCAL_MODULE := libadbd
104LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=0
Dan Albert052c2532015-02-18 17:20:44 -0800105LOCAL_SRC_FILES := \
106 $(LIBADB_SRC_FILES) \
Dan Albertf30d73c2015-02-25 17:51:28 -0800107 adb_auth_client.cpp \
Dan Albertc37cd7c2015-02-20 17:24:30 -0800108 fdevent.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -0800109 jdwp_service.cpp \
Elliott Hughes392692c2015-04-16 14:12:50 -0700110 usb_linux_client.cpp \
Dan Albert052c2532015-02-18 17:20:44 -0800111
Dan Albertfd0be892015-07-30 10:25:32 -0700112LOCAL_SANITIZE := $(adb_target_sanitize)
Elliott Hughesa585cbd2015-04-20 08:09:20 -0700113
Dan Albert27929b02015-03-19 13:25:27 -0700114# Even though we're building a static library (and thus there's no link step for
115# this to take effect), this adds the includes to our path.
116LOCAL_STATIC_LIBRARIES := libbase
117
Dan Albertdfef94a2014-11-25 11:00:56 -0800118include $(BUILD_STATIC_LIBRARY)
119
Dan Albertbbbbea62014-11-24 23:34:35 -0800120include $(CLEAR_VARS)
121LOCAL_MODULE := libadb
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700122LOCAL_MODULE_HOST_OS := darwin linux windows
Dan Albertdfef94a2014-11-25 11:00:56 -0800123LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700124LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
125LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaoe3a87d02015-11-11 17:56:12 -0800126LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
Dan Albert01c58ca2015-02-19 13:19:42 -0800127LOCAL_SRC_FILES := \
128 $(LIBADB_SRC_FILES) \
Dan Albertf30d73c2015-02-25 17:51:28 -0800129 adb_auth_host.cpp \
Dan Albertbbbbea62014-11-24 23:34:35 -0800130
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700131LOCAL_SRC_FILES_darwin := $(LIBADB_darwin_SRC_FILES)
132LOCAL_SRC_FILES_linux := $(LIBADB_linux_SRC_FILES)
133LOCAL_SRC_FILES_windows := $(LIBADB_windows_SRC_FILES)
134
Dan Albertfd0be892015-07-30 10:25:32 -0700135LOCAL_SANITIZE := $(adb_host_sanitize)
Elliott Hughesa585cbd2015-04-20 08:09:20 -0700136
Dan Albert01c58ca2015-02-19 13:19:42 -0800137# Even though we're building a static library (and thus there's no link step for
Dan Albert27929b02015-03-19 13:25:27 -0700138# this to take effect), this adds the includes to our path.
139LOCAL_STATIC_LIBRARIES := libcrypto_static libbase
Dan Albert01c58ca2015-02-19 13:19:42 -0800140
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700141LOCAL_C_INCLUDES_windows := development/host/windows/usb/api/
Dan Willemsen74e85682015-09-03 20:29:56 -0700142LOCAL_MULTILIB := first
Dan Albert8ce32132015-02-24 14:08:03 -0800143
Dan Albertbbbbea62014-11-24 23:34:35 -0800144include $(BUILD_HOST_STATIC_LIBRARY)
145
Dan Albert4895c522015-02-20 17:24:58 -0800146include $(CLEAR_VARS)
Elliott Hughesdf5bb432015-04-19 13:17:01 -0700147LOCAL_CLANG := true
Dan Albert4895c522015-02-20 17:24:58 -0800148LOCAL_MODULE := adbd_test
149LOCAL_CFLAGS := -DADB_HOST=0 $(LIBADB_CFLAGS)
Yabin Cui7c92f0a2015-08-28 15:44:27 -0700150LOCAL_SRC_FILES := \
151 $(LIBADB_TEST_SRCS) \
152 $(LIBADB_TEST_linux_SRCS) \
David Pursell8da19a42015-08-31 10:42:13 -0700153 shell_service.cpp \
David Purselld0df2dd2015-08-31 15:36:18 -0700154 shell_service_protocol.cpp \
155 shell_service_protocol_test.cpp \
David Pursell8da19a42015-08-31 10:42:13 -0700156 shell_service_test.cpp \
Yabin Cui7c92f0a2015-08-28 15:44:27 -0700157
Dan Albertfd0be892015-07-30 10:25:32 -0700158LOCAL_SANITIZE := $(adb_target_sanitize)
Dan Albert4895c522015-02-20 17:24:58 -0800159LOCAL_STATIC_LIBRARIES := libadbd
Yabin Cui9980e662015-09-08 18:27:10 -0700160LOCAL_SHARED_LIBRARIES := libbase libcutils
Dan Albert4895c522015-02-20 17:24:58 -0800161include $(BUILD_NATIVE_TEST)
162
Elliott Hughes70097492015-12-11 19:07:01 -0800163# libdiagnose_usb
164# =========================================================
165
166include $(CLEAR_VARS)
167LOCAL_MODULE := libdiagnose_usb
168LOCAL_MODULE_HOST_OS := darwin linux windows
169LOCAL_CFLAGS := $(LIBADB_CFLAGS)
170LOCAL_SRC_FILES := diagnose_usb.cpp
171# Even though we're building a static library (and thus there's no link step for
172# this to take effect), this adds the includes to our path.
173LOCAL_STATIC_LIBRARIES := libbase
174include $(BUILD_HOST_STATIC_LIBRARY)
175
Spencer Lowc9ddd812015-05-24 15:36:28 -0700176# adb_test
177# =========================================================
178
Dan Albert4895c522015-02-20 17:24:58 -0800179include $(CLEAR_VARS)
Dan Albert4895c522015-02-20 17:24:58 -0800180LOCAL_MODULE := adb_test
Spencer Low639cea42015-09-07 23:39:02 -0700181LOCAL_MODULE_HOST_OS := darwin linux windows
Dan Albert4895c522015-02-20 17:24:58 -0800182LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS)
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700183LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
184LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaoe3a87d02015-11-11 17:56:12 -0800185LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
David Purselld0df2dd2015-08-31 15:36:18 -0700186LOCAL_SRC_FILES := \
187 $(LIBADB_TEST_SRCS) \
188 services.cpp \
189 shell_service_protocol.cpp \
190 shell_service_protocol_test.cpp \
191
David Pursell7616ae12015-09-11 16:06:59 -0700192LOCAL_SRC_FILES_linux := $(LIBADB_TEST_linux_SRCS)
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700193LOCAL_SRC_FILES_darwin := $(LIBADB_TEST_darwin_SRCS)
Spencer Low50740f52015-09-08 17:13:04 -0700194LOCAL_SRC_FILES_windows := $(LIBADB_TEST_windows_SRCS)
Dan Albertfd0be892015-07-30 10:25:32 -0700195LOCAL_SANITIZE := $(adb_host_sanitize)
Yabin Cui9980e662015-09-08 18:27:10 -0700196LOCAL_SHARED_LIBRARIES := libbase
Dan Albert4895c522015-02-20 17:24:58 -0800197LOCAL_STATIC_LIBRARIES := \
198 libadb \
199 libcrypto_static \
200 libcutils \
Elliott Hughes70097492015-12-11 19:07:01 -0800201 libdiagnose_usb \
Dan Albert4895c522015-02-20 17:24:58 -0800202
Spencer Low50740f52015-09-08 17:13:04 -0700203# Set entrypoint to wmain from sysdeps_win32.cpp instead of main
204LOCAL_LDFLAGS_windows := -municode
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700205LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
206LOCAL_LDLIBS_darwin := -framework CoreFoundation -framework IOKit
207LOCAL_LDLIBS_windows := -lws2_32 -luserenv
208LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
Dan Albert4895c522015-02-20 17:24:58 -0800209
Dan Willemsenc6aa5d62015-12-21 16:14:31 -0800210LOCAL_MULTILIB := first
211
Spencer Lowc9ddd812015-05-24 15:36:28 -0700212include $(BUILD_HOST_NATIVE_TEST)
213
Elliott Hughes88b4c852015-04-30 17:32:03 -0700214# adb device tracker (used by ddms) test tool
215# =========================================================
216
217ifeq ($(HOST_OS),linux)
218include $(CLEAR_VARS)
Elliott Hughes88b4c852015-04-30 17:32:03 -0700219LOCAL_MODULE := adb_device_tracker_test
220LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS)
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700221LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
222LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaoe3a87d02015-11-11 17:56:12 -0800223LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
Elliott Hughes88b4c852015-04-30 17:32:03 -0700224LOCAL_SRC_FILES := test_track_devices.cpp
Dan Albertfd0be892015-07-30 10:25:32 -0700225LOCAL_SANITIZE := $(adb_host_sanitize)
Yabin Cui9980e662015-09-08 18:27:10 -0700226LOCAL_SHARED_LIBRARIES := libbase
Elliott Hughes88b4c852015-04-30 17:32:03 -0700227LOCAL_STATIC_LIBRARIES := libadb libcrypto_static libcutils
228LOCAL_LDLIBS += -lrt -ldl -lpthread
229include $(BUILD_HOST_EXECUTABLE)
230endif
231
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800232# adb host tool
233# =========================================================
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800234include $(CLEAR_VARS)
235
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700236LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800237
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700238LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800239
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700240# Use wmain instead of main
241LOCAL_LDFLAGS_windows := -municode
242LOCAL_LDLIBS_windows := -lws2_32 -lgdi32
243LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
244LOCAL_REQUIRED_MODULES_windows := AdbWinApi AdbWinUsbApi
Dan Albert250e58c2015-02-20 17:28:44 -0800245
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800246LOCAL_SRC_FILES := \
Elliott Hughesf5cdc1d2015-10-27 16:03:15 -0700247 adb_client.cpp \
Dan Albert53a37442015-05-08 16:13:53 -0700248 client/main.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -0800249 console.cpp \
250 commandline.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -0800251 file_sync_client.cpp \
Elliott Hughesf5cdc1d2015-10-27 16:03:15 -0700252 line_printer.cpp \
253 services.cpp \
David Purselld0df2dd2015-08-31 15:36:18 -0700254 shell_service_protocol.cpp \
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800255
Dan Albert50f9b902015-02-24 22:38:21 -0800256LOCAL_CFLAGS += \
Dan Alberta8285fb2015-05-05 17:46:50 -0700257 $(ADB_COMMON_CFLAGS) \
Dan Albert50f9b902015-02-24 22:38:21 -0800258 -D_GNU_SOURCE \
259 -DADB_HOST=1 \
260
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700261LOCAL_CFLAGS_windows := \
262 $(ADB_COMMON_windows_CFLAGS)
263
Josh Gaoe3a87d02015-11-11 17:56:12 -0800264LOCAL_CFLAGS_linux := \
265 $(ADB_COMMON_linux_CFLAGS) \
266
267LOCAL_CFLAGS_darwin := \
268 $(ADB_COMMON_darwin_CFLAGS) \
269 -Wno-sizeof-pointer-memaccess -Wno-unused-parameter \
270
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800271LOCAL_MODULE := adb
Benoit Goby12dc3692013-02-20 15:04:53 -0800272LOCAL_MODULE_TAGS := debug
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700273LOCAL_MODULE_HOST_OS := darwin linux windows
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800274
Dan Albertfd0be892015-07-30 10:25:32 -0700275LOCAL_SANITIZE := $(adb_host_sanitize)
Dan Albertbbbbea62014-11-24 23:34:35 -0800276LOCAL_STATIC_LIBRARIES := \
277 libadb \
Elliott Hughes170b5682015-04-17 10:59:34 -0700278 libbase \
Dan Albertbbbbea62014-11-24 23:34:35 -0800279 libcrypto_static \
Elliott Hughes70097492015-12-11 19:07:01 -0800280 libdiagnose_usb \
Elliott Hughes949f2622015-04-27 14:20:17 -0700281 liblog \
Dan Albertbbbbea62014-11-24 23:34:35 -0800282
Josh Gaof5570b82015-11-13 17:55:45 -0800283# Don't use libcutils on Windows.
284LOCAL_STATIC_LIBRARIES_darwin := libcutils
285LOCAL_STATIC_LIBRARIES_linux := libcutils
286
Dan Willemsen1cc079a2015-08-13 14:43:34 -0700287LOCAL_CXX_STL := libc++_static
Colin Cross0a34bfb2015-04-16 16:21:44 -0700288
289# Don't add anything here, we don't want additional shared dependencies
290# on the host adb tool, and shared libraries that link against libc++
291# will violate ODR
292LOCAL_SHARED_LIBRARIES :=
293
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800294include $(BUILD_HOST_EXECUTABLE)
295
Ying Wang9dc50692012-09-05 10:26:43 -0700296$(call dist-for-goals,dist_files sdk,$(LOCAL_BUILT_MODULE))
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800297
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800298
299# adbd device daemon
300# =========================================================
301
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800302include $(CLEAR_VARS)
303
Elliott Hughesdf5bb432015-04-19 13:17:01 -0700304LOCAL_CLANG := true
Dan Albert250e58c2015-02-20 17:28:44 -0800305
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800306LOCAL_SRC_FILES := \
Dan Albert53a37442015-05-08 16:13:53 -0700307 daemon/main.cpp \
Dan Albertf30d73c2015-02-25 17:51:28 -0800308 services.cpp \
309 file_sync_service.cpp \
310 framebuffer_service.cpp \
311 remount_service.cpp \
312 set_verity_enable_state_service.cpp \
David Pursell4f344bb2015-08-28 15:08:49 -0700313 shell_service.cpp \
David Purselld0df2dd2015-08-31 15:36:18 -0700314 shell_service_protocol.cpp \
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800315
Christopher Ferrisd9306912014-09-03 19:48:48 -0700316LOCAL_CFLAGS := \
Dan Alberta8285fb2015-05-05 17:46:50 -0700317 $(ADB_COMMON_CFLAGS) \
Josh Gaoe3a87d02015-11-11 17:56:12 -0800318 $(ADB_COMMON_linux_CFLAGS) \
Dan Albertf30d73c2015-02-25 17:51:28 -0800319 -DADB_HOST=0 \
320 -D_GNU_SOURCE \
Dan Albertf30d73c2015-02-25 17:51:28 -0800321 -Wno-deprecated-declarations \
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800322
Elliott Hughesd7eb8542015-06-17 15:23:42 -0700323LOCAL_CFLAGS += -DALLOW_ADBD_NO_AUTH=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0)
Nick Kralevich09264032012-01-19 13:11:35 -0800324
Elliott Hughesdedf7672015-03-16 21:58:32 +0000325ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
Paul Lawrence5f356482014-10-09 14:22:49 +0000326LOCAL_CFLAGS += -DALLOW_ADBD_DISABLE_VERITY=1
Elliott Hughesd7eb8542015-06-17 15:23:42 -0700327LOCAL_CFLAGS += -DALLOW_ADBD_ROOT=1
Paul Lawrence5f356482014-10-09 14:22:49 +0000328endif
329
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800330LOCAL_MODULE := adbd
331
332LOCAL_FORCE_STATIC_EXECUTABLE := true
333LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
334LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
Tao Bao0db67642015-03-29 11:22:34 -0700335LOCAL_C_INCLUDES += system/extras/ext4_utils
The Android Open Source Project9ca14dc2009-03-03 19:32:55 -0800336
Dan Albertfd0be892015-07-30 10:25:32 -0700337LOCAL_SANITIZE := $(adb_target_sanitize)
Dan Albertbbbbea62014-11-24 23:34:35 -0800338LOCAL_STATIC_LIBRARIES := \
Dan Albertdfef94a2014-11-25 11:00:56 -0800339 libadbd \
Tao Bao0db67642015-03-29 11:22:34 -0700340 libbase \
Dan Albert0ca996b2015-01-26 17:13:54 -0800341 libfs_mgr \
Sami Tolvanen778f5002015-10-20 13:24:24 +0100342 libfec \
343 libfec_rs \
William Roberts075c8522015-08-04 14:23:04 -0700344 libselinux \
Dan Albertbbbbea62014-11-24 23:34:35 -0800345 liblog \
Dan Albertbbbbea62014-11-24 23:34:35 -0800346 libmincrypt \
Dan Albert0ca996b2015-01-26 17:13:54 -0800347 libext4_utils_static \
Sami Tolvanen778f5002015-10-20 13:24:24 +0100348 libsquashfs_utils \
Dan Albert27929b02015-03-19 13:25:27 -0700349 libcutils \
350 libbase \
Jorge Lucangeli Obes83e28512015-12-14 13:18:57 -0800351 libcrypto_static \
Jorge Lucangeli Obes19c28712016-01-08 13:24:13 -0800352 libminijail
Paul Lawrence5f356482014-10-09 14:22:49 +0000353
Jeff Brownf5287b72011-07-11 22:12:32 -0700354include $(BUILD_EXECUTABLE)