summaryrefslogtreecommitdiff
path: root/rbutil/mks5lboot/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/mks5lboot/Makefile')
-rw-r--r--rbutil/mks5lboot/Makefile20
1 files changed, 14 insertions, 6 deletions
diff --git a/rbutil/mks5lboot/Makefile b/rbutil/mks5lboot/Makefile
index ba118eefd0..72ea521d5f 100644
--- a/rbutil/mks5lboot/Makefile
+++ b/rbutil/mks5lboot/Makefile
@@ -4,6 +4,7 @@
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/ 6# \/ \/ \/ \/ \/
7CC := gcc
7CFLAGS += -Wall -Wextra 8CFLAGS += -Wall -Wextra
8 9
9OUTPUT = mks5lboot 10OUTPUT = mks5lboot
@@ -15,18 +16,25 @@ SOURCES := $(LIBSOURCES) main.c
15# dependencies for binary 16# dependencies for binary
16EXTRADEPS := 17EXTRADEPS :=
17 18
18ifeq ($(findstring MINGW,$(shell uname)),MINGW) 19CPPDEFINES := $(shell echo foo | $(CROSS)$(CC) -dM -E -)
20
21ifeq ($(findstring WIN32,$(CPPDEFINES)),WIN32)
19LDOPTS += -lsetupapi 22LDOPTS += -lsetupapi
20# optional libusb support on Windows 23# optional libusb support (needed for WinUSB and libusbK drivers)
21ifdef DISABLE_LIBUSBAPI 24ifeq ($(findstring MINGW,$(CPPDEFINES)),MINGW)
22CFLAGS += -DNO_LIBUSBAPI 25ifeq ($(USE_LIBUSBAPI),1)
23else 26CFLAGS += -DUSE_LIBUSBAPI
24LDOPTS += -Wl,-Bstatic -lusb-1.0 27LDOPTS += -Wl,-Bstatic -lusb-1.0
25endif 28endif
29endif
26else 30else
27# Linux, OS X 31ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE)
32LDOPTS += -L/usr/local/lib -framework IOKit -framework CoreFoundation
33else # Linux
34CFLAGS += -DUSE_LIBUSBAPI
28LDOPTS += -lusb-1.0 35LDOPTS += -lusb-1.0
29endif 36endif
37endif
30 38
31include ../libtools.make 39include ../libtools.make
32 40