-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
82 lines (69 loc) · 2.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# VPATH must be set as the parent directory of adbd, adbd_core and adbd_extras
prefix ?= $(DESTDIR)/usr/local
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin
bin := adbd
CPPFLAGS := $(CPPFLAGS) \
-DADB_LINUX=1 \
-DADB_HOST=0 -DHAVE_FORKEXEC \
-DHAVE_SYMLINKS -D_XOPEN_SOURCE -D_GNU_SOURCE \
-DPROP_VALUE_MAX=92 \
-DPROP_NAME_MAX=32 \
-Dnullptr=NULL \
-DALLOW_ADBD_ROOT=1 \
-include $(VPATH)/adbd_main/compat_and_stubs.h \
-I $(VPATH)/adbd_core/adb \
-I $(VPATH)/adbd_core/fs_mgr/include/ \
-I $(VPATH)/adbd_core/include/ \
-I $(VPATH)/adbd_extras/ext4_utils/
CXXFLAGS := $(CXXFLAGS) \
-fpermissive
LDFLAGS := $(LDFLAGS) \
-pthread \
-lrt
CXX_OBJS := adbd_core/adb/fdevent.cpp.o
C_OBJS := \
adbd_main/compat_and_stubs.c.o \
adbd_main/b64_pton.c.o \
adbd_core/adb/adb.c.o \
adbd_core/adb/adb_auth_client.c.o \
adbd_core/adb/jdwp_service.c.o \
adbd_core/adb/framebuffer_service.c.o \
adbd_core/adb/file_sync_service.c.o \
adbd_core/adb/remount_service.c.o \
adbd_core/adb/set_verity_enable_state_service.c.o \
adbd_core/adb/services.c.o \
adbd_core/adb/sockets.c.o \
adbd_core/adb/transport.c.o \
adbd_core/adb/transport_local.c.o \
adbd_core/adb/transport_usb.c.o \
adbd_core/adb/usb_linux.c.o \
adbd_core/fs_mgr/fs_mgr_fstab.c.o \
adbd_core/libbacktrace/thread_utils.c.o \
adbd_core/libcutils/klog.c.o \
adbd_core/libcutils/socket_inaddr_any_server.c.o \
adbd_core/libcutils/socket_loopback_server.c.o \
adbd_core/libcutils/socket_loopback_client.c.o \
adbd_core/libcutils/socket_local_client.c.o \
adbd_core/libcutils/socket_local_server.c.o \
adbd_core/liblog/logd_write.c.o \
adbd_core/libmincrypt/rsa.c.o \
adbd_core/libmincrypt/sha.c.o \
adbd_core/libmincrypt/sha256.c.o \
adbd_extras/ext4_utils/ext4_sb.c.o
%.cpp.o:%.cpp
mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $^ -c -o $@
%.c.o:%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(CPPFLAGS) $^ -c -o $@
$(bin): $(CXX_OBJS) $(C_OBJS)
$(CXX) $^ -o $@ $(LDFLAGS)
install:$(bin)
mkdir -p $(bindir)
install --mode=755 $^ $(bindir)/
uninstall:
rm -rf $(bindir)/$(bin)
clean:
-rm -f $(CXX_OBJS) $(C_OBJS) &>/dev/null
-rm -rf adbd_core/ adbd_extras/ adbd_main/