From 6f92c498c446c1133801e499840bf6fc607226b4 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Wed, 5 Aug 2020 23:44:07 +0200 Subject: beastpatcher: don't hardcode lib paths. Let the linker find libmtp / libusb. Also don't insist on linking them statically -- current Debian doesn't have a static libmtp. Set STATIC to force linking statically. Change-Id: I3ce9cea832705c87f08054435eadf9f169afedb2 --- utils/MTP/beastpatcher/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/MTP/beastpatcher/Makefile b/utils/MTP/beastpatcher/Makefile index d02f83481d..8be8c39d49 100644 --- a/utils/MTP/beastpatcher/Makefile +++ b/utils/MTP/beastpatcher/Makefile @@ -15,7 +15,10 @@ endif endif ifneq ($(findstring MINGW,$(shell uname)),MINGW) -LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a +LIBS := -lmtp -lusb +ifdef STATIC +LIBS := -Wl,-Bstatic $(LIBS) -Wl,-Bdynamic +endif CFLAGS += $(shell printf \ '\#include \nlibmtp version: LIBMTP_VERSION\n' | \ gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP') -- cgit