diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-05 23:44:07 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-05 23:48:43 +0200 |
commit | 6f92c498c446c1133801e499840bf6fc607226b4 (patch) | |
tree | 39293b3e8e0d419a7acc08eb280363fc1be11883 /utils | |
parent | a74517ac65d04878b0ab9a5856e31123c7192d9f (diff) | |
download | rockbox-6f92c498c446c1133801e499840bf6fc607226b4.tar.gz rockbox-6f92c498c446c1133801e499840bf6fc607226b4.zip |
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
Diffstat (limited to 'utils')
-rw-r--r-- | utils/MTP/beastpatcher/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
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 | |||
15 | endif | 15 | endif |
16 | 16 | ||
17 | ifneq ($(findstring MINGW,$(shell uname)),MINGW) | 17 | ifneq ($(findstring MINGW,$(shell uname)),MINGW) |
18 | LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a | 18 | LIBS := -lmtp -lusb |
19 | ifdef STATIC | ||
20 | LIBS := -Wl,-Bstatic $(LIBS) -Wl,-Bdynamic | ||
21 | endif | ||
19 | CFLAGS += $(shell printf \ | 22 | CFLAGS += $(shell printf \ |
20 | '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \ | 23 | '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \ |
21 | gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP') | 24 | gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP') |