Commit eb44a075 authored by Bernhard Nortmann's avatar Bernhard Nortmann
Browse files

Makefile: allow overriding libusb Makefile variables externally



Also: Add the winsock2 library to LIBS for Windows. When not
linking against it, the usage of WS2 conversion functions from
portable_endian.h would cause unresolved symbols.
Signed-off-by: default avatarBernhard Nortmann <bernhard.nortmann@web.de>
parent f3960f4a
...@@ -98,11 +98,13 @@ sunxi-fexc: fexc.h script.h script.c \ ...@@ -98,11 +98,13 @@ sunxi-fexc: fexc.h script.h script.c \
script_fex.h script_fex.c script_fex.h script_fex.c
LIBUSB = libusb-1.0 LIBUSB = libusb-1.0
LIBUSB_CFLAGS = `pkg-config --cflags $(LIBUSB)` LIBUSB_CFLAGS ?= `pkg-config --cflags $(LIBUSB)`
LIBUSB_LIBS = `pkg-config --libs $(LIBUSB)` LIBUSB_LIBS ?= `pkg-config --libs $(LIBUSB)`
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
# Windows lacks mman.h / mmap() # Windows lacks mman.h / mmap()
DEFINES += -DNO_MMAP DEFINES += -DNO_MMAP
# portable_endian.h relies on winsock2
LIBS += -lws2_32
endif endif
sunxi-fel: fel.c fel-to-spl-thunk.h progress.c progress.h sunxi-fel: fel.c fel-to-spl-thunk.h progress.c progress.h
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment