summaryrefslogtreecommitdiff
path: root/utils/mks5lboot/Makefile
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-15 21:04:28 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-24 18:05:53 +0100
commitc876d3bbefe0dc00c27ca0c12d29da5874946962 (patch)
tree69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/mks5lboot/Makefile
parent6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff)
downloadrockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.tar.gz
rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.zip
rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be considered part of utils too. Having it in a separate folder is an arbitrary split that doesn't help anymore these days, so merge them. This also allows other utils to easily use libtools.make without the need to navigate to a different folder. Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
Diffstat (limited to 'utils/mks5lboot/Makefile')
-rw-r--r--utils/mks5lboot/Makefile43
1 files changed, 43 insertions, 0 deletions
diff --git a/utils/mks5lboot/Makefile b/utils/mks5lboot/Makefile
new file mode 100644
index 0000000000..72ea521d5f
--- /dev/null
+++ b/utils/mks5lboot/Makefile
@@ -0,0 +1,43 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7CC := gcc
8CFLAGS += -Wall -Wextra
9
10OUTPUT = mks5lboot
11
12# inputs for lib
13LIBSOURCES := dualboot.c mkdfu.c ipoddfu.c
14# inputs for binary only
15SOURCES := $(LIBSOURCES) main.c
16# dependencies for binary
17EXTRADEPS :=
18
19CPPDEFINES := $(shell echo foo | $(CROSS)$(CC) -dM -E -)
20
21ifeq ($(findstring WIN32,$(CPPDEFINES)),WIN32)
22LDOPTS += -lsetupapi
23# optional libusb support (needed for WinUSB and libusbK drivers)
24ifeq ($(findstring MINGW,$(CPPDEFINES)),MINGW)
25ifeq ($(USE_LIBUSBAPI),1)
26CFLAGS += -DUSE_LIBUSBAPI
27LDOPTS += -Wl,-Bstatic -lusb-1.0
28endif
29endif
30else
31ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE)
32LDOPTS += -L/usr/local/lib -framework IOKit -framework CoreFoundation
33else # Linux
34CFLAGS += -DUSE_LIBUSBAPI
35LDOPTS += -lusb-1.0
36endif
37endif
38
39include ../libtools.make
40
41# explicit dependencies on dualboot.{c,h} and mks5lboot.h
42$(OBJDIR)mks5lboot.o: dualboot.h dualboot.c mks5lboot.h
43$(OBJDIR)main.o: dualboot.h dualboot.c main.c mks5lboot.h