mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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
This commit is contained in:
parent
a74517ac65
commit
6f92c498c4
1 changed files with 4 additions and 1 deletions
|
|
@ -15,7 +15,10 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring MINGW,$(shell uname)),MINGW)
|
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 \
|
CFLAGS += $(shell printf \
|
||||||
'\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
|
'\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
|
||||||
gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
|
gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue