142 lines
2.8 KiB
Diff
142 lines
2.8 KiB
Diff
|
diff --git a/Makefile b/Makefile
|
||
|
new file mode 100644
|
||
|
index 000000000000..4644fc0b62ad
|
||
|
--- /dev/null
|
||
|
+++ Makefile
|
||
|
@@ -0,0 +1,7 @@
|
||
|
+all:
|
||
|
+ $(MAKE) -C core/adb all
|
||
|
+ $(MAKE) -C core/fastboot all
|
||
|
+
|
||
|
+install:
|
||
|
+ $(MAKE) -C core/adb install
|
||
|
+ $(MAKE) -C core/fastboot install
|
||
|
diff --git a/adb/Makefile b/adb/Makefile
|
||
|
new file mode 100644
|
||
|
index 000000000000..557c185293d7
|
||
|
--- /dev/null
|
||
|
+++ core/adb/Makefile
|
||
|
@@ -0,0 +1,46 @@
|
||
|
+SRCS+= adb.c
|
||
|
+SRCS+= adb_auth_host.c
|
||
|
+SRCS+= adb_client.c
|
||
|
+SRCS+= commandline.c
|
||
|
+SRCS+= console.c
|
||
|
+SRCS+= fdevent.c
|
||
|
+SRCS+= file_sync_client.c
|
||
|
+SRCS+= get_my_path_linux.c
|
||
|
+SRCS+= services.c
|
||
|
+SRCS+= sockets.c
|
||
|
+SRCS+= transport.c
|
||
|
+SRCS+= transport_local.c
|
||
|
+SRCS+= transport_usb.c
|
||
|
+SRCS+= usb_linux.c
|
||
|
+SRCS+= usb_vendors.c
|
||
|
+
|
||
|
+VPATH+= ../libcutils
|
||
|
+SRCS+= load_file.c
|
||
|
+SRCS+= socket_inaddr_any_server.c
|
||
|
+SRCS+= socket_local_client.c
|
||
|
+SRCS+= socket_local_server.c
|
||
|
+SRCS+= socket_loopback_client.c
|
||
|
+SRCS+= socket_loopback_server.c
|
||
|
+SRCS+= socket_network_client.c
|
||
|
+
|
||
|
+VPATH+= ../libzipfile
|
||
|
+SRCS+= centraldir.c
|
||
|
+SRCS+= zipfile.c
|
||
|
+
|
||
|
+CPPFLAGS+= -DADB_HOST=1
|
||
|
+CPPFLAGS+= -DHAVE_FORKEXEC=1
|
||
|
+CPPFLAGS+= -DHAVE_OFF64_T=1
|
||
|
+CPPFLAGS+= -I.
|
||
|
+CPPFLAGS+= -I../include
|
||
|
+
|
||
|
+LIBS+= -lcrypto -lpthread -lz
|
||
|
+
|
||
|
+OBJS= $(SRCS:.c=.o)
|
||
|
+
|
||
|
+all: adb
|
||
|
+
|
||
|
+adb: $(OBJS)
|
||
|
+ $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
||
|
+
|
||
|
+install: adb
|
||
|
+ install -Dm755 adb $(DESTDIR)$(PREFIX)/bin/adb
|
||
|
diff --git a/fastboot/Makefile b/fastboot/Makefile
|
||
|
new file mode 100644
|
||
|
index 000000000000..00ce75b2f4ad
|
||
|
--- /dev/null
|
||
|
+++ core/fastboot/Makefile
|
||
|
@@ -0,0 +1,70 @@
|
||
|
+SRCS+=bootimg.c
|
||
|
+SRCS+=engine.c
|
||
|
+SRCS+=fastboot.c
|
||
|
+SRCS+=protocol.c
|
||
|
+SRCS+=usb_linux.c
|
||
|
+SRCS+=util_linux.c
|
||
|
+SRCS+=util.c
|
||
|
+SRCS+=fs.c
|
||
|
+
|
||
|
+VPATH+= ../libsparse
|
||
|
+SRCS+= backed_block.c
|
||
|
+SRCS+= output_file.c
|
||
|
+SRCS+= sparse.c
|
||
|
+SRCS+= sparse_crc32.c
|
||
|
+SRCS+= sparse_err.c
|
||
|
+SRCS+= sparse_read.c
|
||
|
+
|
||
|
+VPATH+= ../libzipfile
|
||
|
+SRCS+= centraldir.c
|
||
|
+SRCS+= zipfile.c
|
||
|
+
|
||
|
+VPATH+= ../../extras/ext4_utils
|
||
|
+SRCS+= allocate.c
|
||
|
+SRCS+= contents.c
|
||
|
+SRCS+= crc16.c
|
||
|
+SRCS+= ext4_utils.c
|
||
|
+SRCS+= ext4_sb.c
|
||
|
+SRCS+= extent.c
|
||
|
+SRCS+= indirect.c
|
||
|
+SRCS+= make_ext4fs.c
|
||
|
+SRCS+= sha1.c
|
||
|
+SRCS+= uuid.c
|
||
|
+SRCS+= wipe.c
|
||
|
+
|
||
|
+VPATH+= ../../extras/f2fs_utils
|
||
|
+SRCS+= f2fs_utils.c
|
||
|
+SRCS+= f2fs_dlutils.c
|
||
|
+SRCS+= f2fs_ioutils.c
|
||
|
+
|
||
|
+VPATH+= ../../libselinux/src
|
||
|
+SRCS+= callbacks.c
|
||
|
+SRCS+= check_context.c
|
||
|
+SRCS+= freecon.c
|
||
|
+SRCS+= init.c
|
||
|
+SRCS+= label.c
|
||
|
+SRCS+= label_android_property.c
|
||
|
+SRCS+= label_file.c
|
||
|
+
|
||
|
+CPPFLAGS+= -I../include
|
||
|
+CPPFLAGS+= -I../libsparse/include
|
||
|
+CPPFLAGS+= -I../mkbootimg
|
||
|
+CPPFLAGS+= -I../../extras/ext4_utils
|
||
|
+CPPFLAGS+= -I../../extras/f2fs_utils/
|
||
|
+CPPFLAGS+= -I../../libselinux/include
|
||
|
+CPPFLAGS+= -I../../f2fs-tools/include
|
||
|
+CPPFLAGS+= -I../../f2fs-tools/mkfs
|
||
|
+CPPFLAGS+= -DHAVE_OFF64_T=1
|
||
|
+CPPFLAGS+= -std=gnu99
|
||
|
+
|
||
|
+LIBS+= -lz -ldl
|
||
|
+
|
||
|
+OBJS= $(SRCS:.c=.o)
|
||
|
+
|
||
|
+all: fastboot
|
||
|
+
|
||
|
+fastboot: $(OBJS)
|
||
|
+ $(CC) -o $@ $(OBJS) $(LIBS)
|
||
|
+
|
||
|
+install: fastboot
|
||
|
+ install -Dm755 fastboot $(DESTDIR)$(PREFIX)/bin/fastboot
|