diff options
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/adbd.mk')
-rw-r--r-- | dynamic-layers/selinux/android-tools/android-tools/adbd.mk | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/adbd.mk b/dynamic-layers/selinux/android-tools/android-tools/adbd.mk new file mode 100644 index 0000000..cb82683 --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools/adbd.mk | |||
@@ -0,0 +1,72 @@ | |||
1 | include ../../rules_yocto.mk | ||
2 | NAME = adbd | ||
3 | |||
4 | SOURCES = \ | ||
5 | adb/daemon/main.cpp \ | ||
6 | adb/daemon/auth.cpp \ | ||
7 | adb/daemon/jdwp_service.cpp \ | ||
8 | adb/daemon/file_sync_service.cpp \ | ||
9 | adb/daemon/services.cpp \ | ||
10 | adb/daemon/shell_service.cpp \ | ||
11 | adb/daemon/remount_service.cpp \ | ||
12 | adb/daemon/restart_service.cpp \ | ||
13 | adb/daemon/reboot_service.cpp \ | ||
14 | adb/daemon/framebuffer_service.cpp \ | ||
15 | adb/daemon/set_verity_enable_state_service.cpp \ | ||
16 | adb/shell_service_protocol.cpp \ | ||
17 | adb/adb.cpp \ | ||
18 | adb/adb_io.cpp \ | ||
19 | adb/adb_listeners.cpp \ | ||
20 | adb/adb_trace.cpp \ | ||
21 | adb/adb_unique_fd.cpp \ | ||
22 | adb/adb_utils.cpp \ | ||
23 | adb/fdevent.cpp \ | ||
24 | adb/services.cpp \ | ||
25 | adb/sockets.cpp \ | ||
26 | adb/socket_spec.cpp \ | ||
27 | adb/sysdeps/errno.cpp \ | ||
28 | adb/transport.cpp \ | ||
29 | adb/transport_fd.cpp \ | ||
30 | adb/transport_local.cpp \ | ||
31 | adb/transport_usb.cpp \ | ||
32 | adb/sysdeps_unix.cpp \ | ||
33 | adb/sysdeps/posix/network.cpp \ | ||
34 | adb/daemon/usb_legacy.cpp \ | ||
35 | adb/daemon/usb_ffs.cpp \ | ||
36 | adb/daemon/usb.cpp \ | ||
37 | diagnose_usb/diagnose_usb.cpp \ | ||
38 | libasyncio/AsyncIO.cpp \ | ||
39 | |||
40 | CXXFLAGS += -std=gnu++20 | ||
41 | CPPFLAGS += -Iinclude -Iadb -Ibase/include -I$(OUT_DIR)/usr/include/ -Imkbootimg/include/bootimg -Ifs_mgr/include \ | ||
42 | -Ifs_mgr/include_fstab \ | ||
43 | -DADB_VERSION='"$(DEB_VERSION)"' -D_GNU_SOURCE | ||
44 | LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android -Wl,-rpath-link=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ \ | ||
45 | -lpthread -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ -lbase -lcrypto_utils -lcrypto -lcutils -llog -lresolv | ||
46 | |||
47 | PAGE_SIZE ?= 4096 | ||
48 | |||
49 | CXXFLAGS += -UADB_HOST | ||
50 | CXXFLAGS += -DADB_HOST=0 | ||
51 | CXXFLAGS += -DALLOW_ADBD_DISABLE_VERITY | ||
52 | CXXFLAGS += -DALLOW_ADBD_NO_AUTH | ||
53 | CXXFLAGS += -DPLATFORM_TOOLS_VERSION='"28.0.2"' | ||
54 | CXXFLAGS += -Idiagnose_usb/include | ||
55 | CXXFLAGS += -Iadb/daemon/include | ||
56 | CXXFLAGS += -Ilibasyncio/include | ||
57 | CXXFLAGS += -Wno-c++11-narrowing | ||
58 | CXXFLAGS += -DPAGE_SIZE=$(PAGE_SIZE) | ||
59 | |||
60 | |||
61 | # -latomic should be the last library specified | ||
62 | # https://github.com/android/ndk/issues/589 | ||
63 | ifneq ($(filter armel mipsel,$(DEB_HOST_ARCH)),) | ||
64 | LDFLAGS += -latomic | ||
65 | endif | ||
66 | |||
67 | build: $(SOURCES) | ||
68 | mkdir --parents ../../../android-tools/adbd | ||
69 | $(CXX) $^ -o ../../../android-tools/adbd/adbd $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) | ||
70 | |||
71 | clean: | ||
72 | $(RM) $(OUT_DIR)/usr/bin/$(NAME) | ||