Link libusb statically, to avoid dependency on libusb-1.0 for users.

This commit is contained in:
Serge Vakulenko 2018-09-17 16:55:41 -07:00
parent 10e62c50ad
commit 175516fbcf
2 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,7 @@ LIBS = -lusb-1.0
# Linux
ifeq ($(UNAME),Linux)
OBJS += hid-libusb.o
LIBS = -Wl,-Bstatic -lusb-1.0 -Wl,-Bdynamic -lpthread -ludev
endif
# Mac OS X
@ -39,6 +40,8 @@ dmrconfig.linux: dmrconfig
dfu-libusb.o: dfu-libusb.c util.h
dfu-windows.o: dfu-windows.c util.h
hid-libusb.o: hid-libusb.c util.h
hid-macos.o: hid-macos.c util.h
hid-windows.o: hid-windows.c util.h
main.o: main.c radio.h util.h
md380.o: md380.c radio.h util.h
radio.o: radio.c radio.h util.h

View File

@ -33,9 +33,14 @@ install: dmrconfig
install -c -s dmrconfig /usr/local/bin/dmrconfig
###
dfu-libusb.o: dfu-libusb.c util.h
dfu-windows.o: dfu-windows.c util.h
hid-libusb.o: hid-libusb.c util.h
hid-macos.o: hid-macos.c util.h
hid-windows.o: hid-windows.c util.h
main.o: main.c radio.h util.h
md380.o: md380.c radio.h util.h
radio.o: radio.c radio.h util.h
rd5r.o: rd5r.c radio.h util.h
util.o: util.c util.h
uv380.o: uv380.c radio.h util.h