blob: b792bd44bef35a48258e5b9f65619f82de1e5d79 [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 := \
21 -std=c++14 \
22 -Wexit-time-destructors \
23
24ADB_COMMON_darwin_CFLAGS := \
25 -std=c++14 \
26 -Wexit-time-destructors \
27
Spencer Lowe347c1d2015-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 Lowd21dc822015-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 Lowe347c1d2015-08-02 18:13:54 -070034ADB_COMMON_windows_CFLAGS := \
35 -DUNICODE=1 -D_UNICODE=1 \
36
Dan Albert630b9af2014-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 Albertba3a2512015-02-18 17:47:33 -080046LIBADB_SRC_FILES := \
Dan Albertbac34742015-02-25 17:51:28 -080047 adb.cpp \
48 adb_auth.cpp \
Dan Albertcc731cc2015-02-24 21:26:58 -080049 adb_io.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080050 adb_listeners.cpp \
Yabin Cuiaed3c612015-09-22 15:52:57 -070051 adb_trace.cpp \
Elliott Hughes58305772015-04-17 13:57:15 -070052 adb_utils.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080053 sockets.cpp \
54 transport.cpp \
55 transport_local.cpp \
56 transport_usb.cpp \
Dan Albertba3a2512015-02-18 17:47:33 -080057
Elliott Hughes53daee62015-04-19 13:17:01 -070058LIBADB_TEST_SRCS := \
59 adb_io_test.cpp \
60 adb_utils_test.cpp \
Josh Gaod302a152016-02-09 14:59:09 -080061 sysdeps_test.cpp \
Elliott Hughes53daee62015-04-19 13:17:01 -070062 transport_test.cpp \
63
Dan Albertbf106472015-02-20 17:20:09 -080064LIBADB_CFLAGS := \
Dan Albert1ba1d7c2015-05-05 17:46:50 -070065 $(ADB_COMMON_CFLAGS) \
Dan Albertba3a2512015-02-18 17:47:33 -080066 -fvisibility=hidden \
Elliott Hughes4f1d7b52015-07-24 14:32:46 -070067
68LIBADB_linux_CFLAGS := \
Josh Gaob7b1edf2015-11-11 17:56:12 -080069 $(ADB_COMMON_linux_CFLAGS) \
70
71LIBADB_darwin_CFLAGS := \
72 $(ADB_COMMON_darwin_CFLAGS) \
Dan Albert630b9af2014-11-24 23:34:35 -080073
Dan Willemsen87a419c2015-08-13 14:43:34 -070074LIBADB_windows_CFLAGS := \
75 $(ADB_COMMON_windows_CFLAGS) \
Elliott Hughes4f1d7b52015-07-24 14:32:46 -070076
Dan Albertbac34742015-02-25 17:51:28 -080077LIBADB_darwin_SRC_FILES := \
78 fdevent.cpp \
Elliott Hughes1a4d85a2015-04-16 13:24:58 -070079 get_my_path_darwin.cpp \
Dan Albert7447dd02015-04-16 19:20:40 -070080 usb_osx.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080081
82LIBADB_linux_SRC_FILES := \
83 fdevent.cpp \
84 get_my_path_linux.cpp \
85 usb_linux.cpp \
86
87LIBADB_windows_SRC_FILES := \
Elliott Hughesa2f2e562015-04-16 16:47:02 -070088 sysdeps_win32.cpp \
Dan Albertbac34742015-02-25 17:51:28 -080089 usb_windows.cpp \
Dan Albert94493762014-11-25 11:00:56 -080090
Yabin Cuibec02fc2015-08-28 15:44:27 -070091LIBADB_TEST_linux_SRCS := \
92 fdevent_test.cpp \
Yabin Cuic1b1f6f2015-09-15 16:27:09 -070093 socket_test.cpp \
Yabin Cuibec02fc2015-08-28 15:44:27 -070094
95LIBADB_TEST_darwin_SRCS := \
96 fdevent_test.cpp \
Yabin Cuic1b1f6f2015-09-15 16:27:09 -070097 socket_test.cpp \
Yabin Cuibec02fc2015-08-28 15:44:27 -070098
Spencer Lowe6ae5732015-09-08 17:13:04 -070099LIBADB_TEST_windows_SRCS := \
100 sysdeps_win32_test.cpp \
101
Dan Albert94493762014-11-25 11:00:56 -0800102include $(CLEAR_VARS)
Elliott Hughes2acec912015-04-16 14:12:50 -0700103LOCAL_CLANG := true
Dan Albert94493762014-11-25 11:00:56 -0800104LOCAL_MODULE := libadbd
105LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=0
Dan Albert21c3eaf2015-02-18 17:20:44 -0800106LOCAL_SRC_FILES := \
107 $(LIBADB_SRC_FILES) \
Dan Albertbac34742015-02-25 17:51:28 -0800108 adb_auth_client.cpp \
Dan Albert3c438582015-02-20 17:24:30 -0800109 fdevent.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800110 jdwp_service.cpp \
Elliott Hughes2acec912015-04-16 14:12:50 -0700111 usb_linux_client.cpp \
Dan Albert21c3eaf2015-02-18 17:20:44 -0800112
Dan Albert9113b472015-07-30 10:25:32 -0700113LOCAL_SANITIZE := $(adb_target_sanitize)
Elliott Hughes7b506092015-04-20 08:09:20 -0700114
Dan Alberte2462192015-03-19 13:25:27 -0700115# Even though we're building a static library (and thus there's no link step for
116# this to take effect), this adds the includes to our path.
117LOCAL_STATIC_LIBRARIES := libbase
118
Dan Albert94493762014-11-25 11:00:56 -0800119include $(BUILD_STATIC_LIBRARY)
120
Dan Albert630b9af2014-11-24 23:34:35 -0800121include $(CLEAR_VARS)
122LOCAL_MODULE := libadb
Dan Willemsen87a419c2015-08-13 14:43:34 -0700123LOCAL_MODULE_HOST_OS := darwin linux windows
Dan Albert94493762014-11-25 11:00:56 -0800124LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
Dan Willemsen87a419c2015-08-13 14:43:34 -0700125LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
126LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaob7b1edf2015-11-11 17:56:12 -0800127LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
Dan Alberte1ca6232015-02-19 13:19:42 -0800128LOCAL_SRC_FILES := \
129 $(LIBADB_SRC_FILES) \
Dan Albertbac34742015-02-25 17:51:28 -0800130 adb_auth_host.cpp \
Dan Albert630b9af2014-11-24 23:34:35 -0800131
Dan Willemsen87a419c2015-08-13 14:43:34 -0700132LOCAL_SRC_FILES_darwin := $(LIBADB_darwin_SRC_FILES)
133LOCAL_SRC_FILES_linux := $(LIBADB_linux_SRC_FILES)
134LOCAL_SRC_FILES_windows := $(LIBADB_windows_SRC_FILES)
135
Dan Albert9113b472015-07-30 10:25:32 -0700136LOCAL_SANITIZE := $(adb_host_sanitize)
Elliott Hughes7b506092015-04-20 08:09:20 -0700137
Dan Alberte1ca6232015-02-19 13:19:42 -0800138# Even though we're building a static library (and thus there's no link step for
Dan Alberte2462192015-03-19 13:25:27 -0700139# this to take effect), this adds the includes to our path.
140LOCAL_STATIC_LIBRARIES := libcrypto_static libbase
Dan Alberte1ca6232015-02-19 13:19:42 -0800141
Dan Willemsen87a419c2015-08-13 14:43:34 -0700142LOCAL_C_INCLUDES_windows := development/host/windows/usb/api/
Dan Willemsen66680c52015-09-03 20:29:56 -0700143LOCAL_MULTILIB := first
Dan Albert88cf1c82015-02-24 14:08:03 -0800144
Dan Albert630b9af2014-11-24 23:34:35 -0800145include $(BUILD_HOST_STATIC_LIBRARY)
146
Dan Albert055f1aa2015-02-20 17:24:58 -0800147include $(CLEAR_VARS)
Elliott Hughes53daee62015-04-19 13:17:01 -0700148LOCAL_CLANG := true
Dan Albert055f1aa2015-02-20 17:24:58 -0800149LOCAL_MODULE := adbd_test
150LOCAL_CFLAGS := -DADB_HOST=0 $(LIBADB_CFLAGS)
Yabin Cuibec02fc2015-08-28 15:44:27 -0700151LOCAL_SRC_FILES := \
152 $(LIBADB_TEST_SRCS) \
153 $(LIBADB_TEST_linux_SRCS) \
David Pursell0955c662015-08-31 10:42:13 -0700154 shell_service.cpp \
David Pursellb9e2e842015-08-31 15:36:18 -0700155 shell_service_protocol.cpp \
156 shell_service_protocol_test.cpp \
David Pursell0955c662015-08-31 10:42:13 -0700157 shell_service_test.cpp \
Yabin Cuibec02fc2015-08-28 15:44:27 -0700158
Dan Albert9113b472015-07-30 10:25:32 -0700159LOCAL_SANITIZE := $(adb_target_sanitize)
Dan Albert055f1aa2015-02-20 17:24:58 -0800160LOCAL_STATIC_LIBRARIES := libadbd
Dimitry Ivanov8b642e42016-02-12 18:40:29 -0800161LOCAL_SHARED_LIBRARIES := liblog libbase libcutils
Dan Albert055f1aa2015-02-20 17:24:58 -0800162include $(BUILD_NATIVE_TEST)
163
Elliott Hughes1b708d32015-12-11 19:07:01 -0800164# libdiagnose_usb
165# =========================================================
166
167include $(CLEAR_VARS)
168LOCAL_MODULE := libdiagnose_usb
169LOCAL_MODULE_HOST_OS := darwin linux windows
170LOCAL_CFLAGS := $(LIBADB_CFLAGS)
171LOCAL_SRC_FILES := diagnose_usb.cpp
172# Even though we're building a static library (and thus there's no link step for
173# this to take effect), this adds the includes to our path.
174LOCAL_STATIC_LIBRARIES := libbase
175include $(BUILD_HOST_STATIC_LIBRARY)
176
Spencer Lowcf168a82015-05-24 15:36:28 -0700177# adb_test
178# =========================================================
179
Dan Albert055f1aa2015-02-20 17:24:58 -0800180include $(CLEAR_VARS)
Dan Albert055f1aa2015-02-20 17:24:58 -0800181LOCAL_MODULE := adb_test
Spencer Lowebf770f2015-09-07 23:39:02 -0700182LOCAL_MODULE_HOST_OS := darwin linux windows
Dan Albert055f1aa2015-02-20 17:24:58 -0800183LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS)
Dan Willemsen87a419c2015-08-13 14:43:34 -0700184LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
185LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaob7b1edf2015-11-11 17:56:12 -0800186LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
David Pursellb9e2e842015-08-31 15:36:18 -0700187LOCAL_SRC_FILES := \
188 $(LIBADB_TEST_SRCS) \
189 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 \
200 libcrypto_static \
201 libcutils \
Elliott Hughes1b708d32015-12-11 19:07:01 -0800202 libdiagnose_usb \
Dan Albert055f1aa2015-02-20 17:24:58 -0800203
Spencer Lowe6ae5732015-09-08 17:13:04 -0700204# Set entrypoint to wmain from sysdeps_win32.cpp instead of main
205LOCAL_LDFLAGS_windows := -municode
Dan Willemsen87a419c2015-08-13 14:43:34 -0700206LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
207LOCAL_LDLIBS_darwin := -framework CoreFoundation -framework IOKit
208LOCAL_LDLIBS_windows := -lws2_32 -luserenv
209LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
Dan Albert055f1aa2015-02-20 17:24:58 -0800210
Dan Willemsen1e20e0a2015-12-21 16:14:31 -0800211LOCAL_MULTILIB := first
212
Spencer Lowcf168a82015-05-24 15:36:28 -0700213include $(BUILD_HOST_NATIVE_TEST)
214
Elliott Hughese67f1f82015-04-30 17:32:03 -0700215# adb device tracker (used by ddms) test tool
216# =========================================================
217
218ifeq ($(HOST_OS),linux)
219include $(CLEAR_VARS)
Elliott Hughese67f1f82015-04-30 17:32:03 -0700220LOCAL_MODULE := adb_device_tracker_test
221LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS)
Dan Willemsen87a419c2015-08-13 14:43:34 -0700222LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
223LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
Josh Gaob7b1edf2015-11-11 17:56:12 -0800224LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
Elliott Hughese67f1f82015-04-30 17:32:03 -0700225LOCAL_SRC_FILES := test_track_devices.cpp
Dan Albert9113b472015-07-30 10:25:32 -0700226LOCAL_SANITIZE := $(adb_host_sanitize)
Yabin Cuicb992d92015-09-08 18:27:10 -0700227LOCAL_SHARED_LIBRARIES := libbase
Elliott Hughese67f1f82015-04-30 17:32:03 -0700228LOCAL_STATIC_LIBRARIES := libadb libcrypto_static libcutils
229LOCAL_LDLIBS += -lrt -ldl -lpthread
230include $(BUILD_HOST_EXECUTABLE)
231endif
232
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800233# adb host tool
234# =========================================================
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800235include $(CLEAR_VARS)
236
Dan Willemsen87a419c2015-08-13 14:43:34 -0700237LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800238
Dan Willemsen87a419c2015-08-13 14:43:34 -0700239LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800240
Dan Willemsen87a419c2015-08-13 14:43:34 -0700241# Use wmain instead of main
242LOCAL_LDFLAGS_windows := -municode
243LOCAL_LDLIBS_windows := -lws2_32 -lgdi32
244LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
245LOCAL_REQUIRED_MODULES_windows := AdbWinApi AdbWinUsbApi
Dan Albert9697ce52015-02-20 17:28:44 -0800246
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800247LOCAL_SRC_FILES := \
Elliott Hughesb708d162015-10-27 16:03:15 -0700248 adb_client.cpp \
Dan Albertc89e0cc2015-05-08 16:13:53 -0700249 client/main.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800250 console.cpp \
251 commandline.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800252 file_sync_client.cpp \
Elliott Hughesb708d162015-10-27 16:03:15 -0700253 line_printer.cpp \
254 services.cpp \
David Pursellb9e2e842015-08-31 15:36:18 -0700255 shell_service_protocol.cpp \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800256
Dan Albert7fd821e2015-02-24 22:38:21 -0800257LOCAL_CFLAGS += \
Dan Albert1ba1d7c2015-05-05 17:46:50 -0700258 $(ADB_COMMON_CFLAGS) \
Dan Albert7fd821e2015-02-24 22:38:21 -0800259 -D_GNU_SOURCE \
260 -DADB_HOST=1 \
261
Dan Willemsen87a419c2015-08-13 14:43:34 -0700262LOCAL_CFLAGS_windows := \
263 $(ADB_COMMON_windows_CFLAGS)
264
Josh Gaob7b1edf2015-11-11 17:56:12 -0800265LOCAL_CFLAGS_linux := \
266 $(ADB_COMMON_linux_CFLAGS) \
267
268LOCAL_CFLAGS_darwin := \
269 $(ADB_COMMON_darwin_CFLAGS) \
270 -Wno-sizeof-pointer-memaccess -Wno-unused-parameter \
271
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800272LOCAL_MODULE := adb
Kenny Rootd5d6d972012-09-26 09:58:07 -0700273LOCAL_MODULE_TAGS := debug
Dan Willemsen87a419c2015-08-13 14:43:34 -0700274LOCAL_MODULE_HOST_OS := darwin linux windows
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800275
Dan Albert9113b472015-07-30 10:25:32 -0700276LOCAL_SANITIZE := $(adb_host_sanitize)
Dan Albert630b9af2014-11-24 23:34:35 -0800277LOCAL_STATIC_LIBRARIES := \
278 libadb \
Elliott Hughes2baae3a2015-04-17 10:59:34 -0700279 libbase \
Dan Albert630b9af2014-11-24 23:34:35 -0800280 libcrypto_static \
Elliott Hughes1b708d32015-12-11 19:07:01 -0800281 libdiagnose_usb \
Elliott Hughes9309ecb2015-04-27 14:20:17 -0700282 liblog \
Dan Albert630b9af2014-11-24 23:34:35 -0800283
Josh Gaoa629e2e2015-11-13 17:55:45 -0800284# Don't use libcutils on Windows.
285LOCAL_STATIC_LIBRARIES_darwin := libcutils
286LOCAL_STATIC_LIBRARIES_linux := libcutils
287
Dan Willemsen87a419c2015-08-13 14:43:34 -0700288LOCAL_CXX_STL := libc++_static
Colin Cross55bf5f02015-04-16 16:21:44 -0700289
290# Don't add anything here, we don't want additional shared dependencies
291# on the host adb tool, and shared libraries that link against libc++
292# will violate ODR
293LOCAL_SHARED_LIBRARIES :=
294
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800295include $(BUILD_HOST_EXECUTABLE)
296
Ying Wang96535ba2012-09-05 10:26:43 -0700297$(call dist-for-goals,dist_files sdk,$(LOCAL_BUILT_MODULE))
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800298
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800299
300# adbd device daemon
301# =========================================================
302
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800303include $(CLEAR_VARS)
304
Elliott Hughes53daee62015-04-19 13:17:01 -0700305LOCAL_CLANG := true
Dan Albert9697ce52015-02-20 17:28:44 -0800306
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800307LOCAL_SRC_FILES := \
Dan Albertc89e0cc2015-05-08 16:13:53 -0700308 daemon/main.cpp \
Dan Albertbac34742015-02-25 17:51:28 -0800309 services.cpp \
310 file_sync_service.cpp \
311 framebuffer_service.cpp \
312 remount_service.cpp \
313 set_verity_enable_state_service.cpp \
David Pursell80f67022015-08-28 15:08:49 -0700314 shell_service.cpp \
David Pursellb9e2e842015-08-31 15:36:18 -0700315 shell_service_protocol.cpp \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800316
Christopher Ferris51448eb2014-09-03 19:48:48 -0700317LOCAL_CFLAGS := \
Dan Albert1ba1d7c2015-05-05 17:46:50 -0700318 $(ADB_COMMON_CFLAGS) \
Josh Gaob7b1edf2015-11-11 17:56:12 -0800319 $(ADB_COMMON_linux_CFLAGS) \
Dan Albertbac34742015-02-25 17:51:28 -0800320 -DADB_HOST=0 \
321 -D_GNU_SOURCE \
Dan Albertbac34742015-02-25 17:51:28 -0800322 -Wno-deprecated-declarations \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800323
Elliott Hughes5cba5042015-06-17 15:23:42 -0700324LOCAL_CFLAGS += -DALLOW_ADBD_NO_AUTH=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0)
Nick Kralevich5890fe32012-01-19 13:11:35 -0800325
Elliott Hughesec7a6672015-03-16 21:58:32 +0000326ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
Paul Lawrenceec900bb2014-10-09 14:22:49 +0000327LOCAL_CFLAGS += -DALLOW_ADBD_DISABLE_VERITY=1
Elliott Hughes5cba5042015-06-17 15:23:42 -0700328LOCAL_CFLAGS += -DALLOW_ADBD_ROOT=1
Paul Lawrenceec900bb2014-10-09 14:22:49 +0000329endif
330
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800331LOCAL_MODULE := adbd
332
333LOCAL_FORCE_STATIC_EXECUTABLE := true
334LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
335LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
Tao Bao175b7bb2015-03-29 11:22:34 -0700336LOCAL_C_INCLUDES += system/extras/ext4_utils
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800337
Dan Albert9113b472015-07-30 10:25:32 -0700338LOCAL_SANITIZE := $(adb_target_sanitize)
Dan Albert630b9af2014-11-24 23:34:35 -0800339LOCAL_STATIC_LIBRARIES := \
Dan Albert94493762014-11-25 11:00:56 -0800340 libadbd \
Tao Bao175b7bb2015-03-29 11:22:34 -0700341 libbase \
Dan Albert030b76f2015-01-26 17:13:54 -0800342 libfs_mgr \
Sami Tolvanen8ad80762015-10-20 13:24:24 +0100343 libfec \
344 libfec_rs \
William Robertsbd2d9612015-08-04 14:23:04 -0700345 libselinux \
Dan Albert630b9af2014-11-24 23:34:35 -0800346 liblog \
Dan Albert630b9af2014-11-24 23:34:35 -0800347 libmincrypt \
Dan Albert030b76f2015-01-26 17:13:54 -0800348 libext4_utils_static \
Sami Tolvanen8ad80762015-10-20 13:24:24 +0100349 libsquashfs_utils \
Dan Alberte2462192015-03-19 13:25:27 -0700350 libcutils \
351 libbase \
Jorge Lucangeli Obes683dc482015-12-14 13:18:57 -0800352 libcrypto_static \
Jorge Lucangeli Obes218eb7c2016-01-08 13:24:13 -0800353 libminijail
Paul Lawrenceec900bb2014-10-09 14:22:49 +0000354
Jeff Brown29e1e732011-07-11 22:12:32 -0700355include $(BUILD_EXECUTABLE)