File: fastboot.mk

package info (click to toggle)
android-platform-tools 35.0.2-1~exp6
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 211,716 kB
  • sloc: cpp: 995,749; java: 290,495; ansic: 145,647; xml: 58,531; python: 39,608; sh: 14,500; javascript: 5,198; asm: 4,866; makefile: 3,115; yacc: 769; awk: 368; ruby: 183; sql: 140; perl: 88; lex: 67
file content (90 lines) | stat: -rw-r--r-- 2,146 bytes parent folder | download | duplicates (3)
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
82
83
84
85
86
87
88
89
90
NAME = fastboot

# system/core/fastboot/Android.bp
fastboot_SOURCES = \
  bootimg_utils.cpp \
  fastboot_driver.cpp \
  fastboot.cpp \
  filesystem.cpp \
  fs.cpp \
  main.cpp \
  socket.cpp \
  storage.cpp \
  super_flash_helper.cpp \
  tcp.cpp \
  udp.cpp \
  util.cpp \
  vendor_boot_img_utils.cpp \
  task.cpp \
  \
  usb_linux.cpp \

# system/core/fs_mgr/liblp/Android.bp
fs_mgr_liblp_SOURCES := \
  builder.cpp \
  super_layout_builder.cpp \
  images.cpp \
  partition_opener.cpp \
  property_fetcher.cpp \
  reader.cpp \
  utility.cpp \
  writer.cpp \

SOURCES := \
  $(foreach source, $(fastboot_SOURCES), system/core/fastboot/$(source)) \
  $(foreach source, $(fs_mgr_liblp_SOURCES), system/core/fs_mgr/liblp/$(source))
OBJECTS = $(SOURCES:.cpp=.o)

CXXFLAGS += -fpermissive
CPPFLAGS += \
  -D_FILE_OFFSET_BITS=64 \
  -DPLATFORM_TOOLS_VERSION='"$(PLATFORM_TOOLS_VERSION)"' \
  -Iexternal/avb \
  -Iexternal/fmtlib/include \
  -Ipackages/modules/adb \
  -Isystem/core/demangle/include \
  -Isystem/core/diagnose_usb/include \
  -Isystem/core/fs_mgr/include \
  -Isystem/core/fs_mgr/include_fstab \
  -Isystem/core/fs_mgr/liblp/include \
  -Isystem/core/fs_mgr/libstorage_literals \
  -Isystem/core/include \
  -Isystem/core/libcutils/include \
  -Isystem/core/libsparse/include \
  -Isystem/extras/ext4_utils/include \
  -Isystem/libbase/include \
  -Isystem/libziparchive/include \
  -Isystem/tools/mkbootimg/include/bootimg \
  \
  -I/usr/include/android \

LDFLAGS += \
  -Ldebian/out/system \
  -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
  -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
  -lbase \
  -lcrypto \
  -lcutils \
  -llog \
  -lpthread \
  -lprotobuf \
  -lsparse \
  -lusb-1.0 \
  -lziparchive \
  -pie \

STATIC_LIBS = \
  debian/out/system/libadb.a \
  debian/out/system/extras/libext4_utils.a \

# -latomic should be the last library specified
# https://github.com/android/ndk/issues/589
ifneq ($(filter armel mipsel,$(DEB_HOST_ARCH)),)
  LDFLAGS += -latomic
endif

debian/out/system/$(NAME): $(OBJECTS) $(STATIC_LIBS)
	$(CXX) -o $@ $^ $(LDFLAGS)

$(OBJECTS): %.o: %.cpp
	$(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS)