kumquat-buildroot/package/android-tools/0001-Fix-makefiles-for-out-of-tree-build.patch

163 lines
4.2 KiB
Diff
Raw Normal View History

[PATCH] Fix makefiles for out-of-tree build
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
debian/makefiles/adb.mk | 10 +++++-----
debian/makefiles/adbd.mk | 33 ++++++++++++++++-----------------
debian/makefiles/fastboot.mk | 17 +++++++++--------
3 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/debian/makefiles/adb.mk b/debian/makefiles/adb.mk
index d9d4feb..654b9f1 100644
--- a/debian/makefiles/adb.mk
+++ b/debian/makefiles/adb.mk
@@ -1,5 +1,6 @@
# Makefile for adb; from https://heiher.info/2227.html
+VPATH+= $(SRCDIR)/core/adb
SRCS+= adb.c
SRCS+= adb_client.c
SRCS+= adb_auth_host.c
@@ -17,7 +18,7 @@ SRCS+= usb_linux.c
SRCS+= usb_vendors.c
SRCS+= utils.c
-VPATH+= ../libcutils
+VPATH+= $(SRCDIR)/core/libcutils
SRCS+= abort_socket.c
SRCS+= socket_inaddr_any_server.c
SRCS+= socket_local_client.c
@@ -28,7 +29,7 @@ SRCS+= socket_network_client.c
SRCS+= list.c
SRCS+= load_file.c
-VPATH+= ../libzipfile
+VPATH+= $(SRCDIR)/core/libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
@@ -37,9 +38,8 @@ CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
-CPPFLAGS+= -I.
-CPPFLAGS+= -I../include
-CPPFLAGS+= -I../../../external/zlib
+CPPFLAGS+= -I$(SRCDIR)/core/adb
+CPPFLAGS+= -I$(SRCDIR)/core/include
LIBS+= -lc -lpthread -lz -lcrypto
diff --git a/debian/makefiles/adbd.mk b/debian/makefiles/adbd.mk
index 94d3a90..49dab8c 100644
--- a/debian/makefiles/adbd.mk
+++ b/debian/makefiles/adbd.mk
@@ -1,18 +1,6 @@
# Makefile for adbd
-VPATH+= ../libcutils
-SRCS+= abort_socket.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
-SRCS+= list.c
-SRCS+= load_file.c
-SRCS+= android_reboot.c
-
-#VPATH+= ../adb
+VPATH+= $(SRCDIR)/core/adbd
SRCS+= adb.c
SRCS+= backup_service.c
SRCS+= fdevent.c
@@ -31,7 +19,19 @@ SRCS+= log_service.c
SRCS+= utils.c
SRCS+= base64.c
-VPATH+= ../libzipfile
+VPATH+= $(SRCDIR)/core/libcutils
+SRCS+= abort_socket.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
+SRCS+= list.c
+SRCS+= load_file.c
+SRCS+= android_reboot.c
+
+VPATH+= $(SRCDIR)/core/libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
@@ -40,10 +40,9 @@ CPPFLAGS+= -O2 -g -Wall -Wno-unused-parameter
CPPFLAGS+= -DADB_HOST=0 -DHAVE_FORKEXEC=1 -D_XOPEN_SOURCE -D_GNU_SOURCE -DALLOW_ADBD_ROOT=1
CPPFLAGS+= -DHAVE_SYMLINKS -DBOARD_ALWAYS_INSECURE
CPPFLAGS+= -DHAVE_TERMIO_H
-CPPFLAGS+= -I.
-CPPFLAGS+= -I../include
-CPPFLAGS+= -I../../../external/zlib
CPPFLAGS+= `pkg-config --cflags glib-2.0 gio-2.0`
+CPPFLAGS+= -I$(SRCDIR)/core/adbd
+CPPFLAGS+= -I$(SRCDIR)/core/include
LIBS+= -lc -lpthread -lz -lcrypto -lcrypt `pkg-config --libs glib-2.0 gio-2.0`
diff --git a/debian/makefiles/fastboot.mk b/debian/makefiles/fastboot.mk
index 9e8b751..94a069b 100644
--- a/debian/makefiles/fastboot.mk
+++ b/debian/makefiles/fastboot.mk
@@ -1,5 +1,6 @@
# Makefile for fastboot; from https://heiher.info/2227.html
+VPATH+= $(SRCDIR)/core/fastboot
SRCS+= bootimg.c
SRCS+= engine.c
SRCS+= fastboot.c
@@ -7,11 +8,11 @@ SRCS+= protocol.c
SRCS+= usb_linux.c
SRCS+= util_linux.c
-VPATH+= ../libzipfile
+VPATH+= $(SRCDIR)/core/libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
-VPATH+= ../libsparse
+VPATH+= $(SRCDIR)/core/libsparse
SRCS+= backed_block.c
SRCS+= sparse_crc32.c
SRCS+= sparse.c
@@ -19,7 +20,7 @@ SRCS+= sparse_read.c
SRCS+= sparse_err.c
SRCS+= output_file.c
-VPATH+= ../../extras/ext4_utils/
+VPATH+= $(SRCDIR)/extras/ext4_utils/
SRCS+= make_ext4fs.c
SRCS+= crc16.c
SRCS+= ext4_utils.c
@@ -31,11 +32,11 @@ SRCS+= extent.c
SRCS+= wipe.c
SRCS+= sha1.c
-CPPFLAGS+= -I.
-CPPFLAGS+= -I../include
-CPPFLAGS+= -I../mkbootimg
-CPPFLAGS+= -I../../extras/ext4_utils/
-CPPFLAGS+= -I../libsparse/include/
+CPPFLAGS+= -I$(SRCDIR)/core/fastboot
+CPPFLAGS+= -I$(SRCDIR)/core/include
+CPPFLAGS+= -I$(SRCDIR)/core/mkbootimg
+CPPFLAGS+= -I$(SRCDIR)/extras/ext4_utils/
+CPPFLAGS+= -I$(SRCDIR)/core/libsparse/include/
LIBS+= -lz -lselinux
--
2.5.1