diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-15 21:04:28 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-24 18:05:53 +0100 |
commit | c876d3bbefe0dc00c27ca0c12d29da5874946962 (patch) | |
tree | 69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/sansapatcher/Makefile | |
parent | 6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff) | |
download | rockbox-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/sansapatcher/Makefile')
-rw-r--r-- | utils/sansapatcher/Makefile | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/utils/sansapatcher/Makefile b/utils/sansapatcher/Makefile new file mode 100644 index 0000000000..85c36c6d14 --- /dev/null +++ b/utils/sansapatcher/Makefile | |||
@@ -0,0 +1,52 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | |||
8 | TARGET_DIR ?= $(shell pwd)/ | ||
9 | CFLAGS += -Wall -W -D_LARGEFILE64_SOURCE | ||
10 | |||
11 | OUTPUT = sansapatcher | ||
12 | |||
13 | # inputs | ||
14 | LIBSOURCES := sansapatcher.c sansaio-posix.c sansaio-win32.c | ||
15 | SOURCES := main.c | ||
16 | # additional link dependencies for the standalone executable | ||
17 | EXTRADEPS := | ||
18 | |||
19 | # Releases of sansapatcher are created with "make RELEASE=1". This | ||
20 | # enables BOOTOBJS and uses the VERSION string defined in main.c | ||
21 | ifdef RELEASE | ||
22 | CFLAGS += -DRELEASE | ||
23 | BOOTOBJS=1 | ||
24 | endif | ||
25 | |||
26 | ifdef WITH_BOOTOBJS | ||
27 | BOOTSRC = bootimg_c200.c bootimg_e200.c | ||
28 | SOURCES += $(BOOTSRC) | ||
29 | CFLAGS += -DWITH_BOOTOBJS | ||
30 | endif | ||
31 | |||
32 | include ../libtools.make | ||
33 | |||
34 | # find out if we need to link the manifest resource. | ||
35 | # Since libtools.make sets up BINARY we check it for the file extension .exe. | ||
36 | ifeq ($(findstring exe,$(BINARY)),exe) | ||
37 | $(BINARY): $(OBJDIR)sansapatcher-rc.o | ||
38 | endif | ||
39 | |||
40 | $(OBJDIR)main.o: $(BOOTSRC) | ||
41 | $(OBJDIR)sansapatcher-rc.o: sansapatcher.rc sansapatcher.manifest | ||
42 | @echo WINDRES $(notdir $<) | ||
43 | $(SILENT)$(CROSS)$(WINDRES) -i sansapatcher.rc -o $@ | ||
44 | |||
45 | bootimg_c200.c: firmware.mi4 $(BIN2C) | ||
46 | @echo BIN2C $< | ||
47 | $(SILENT)$(BIN2C) $< $* | ||
48 | |||
49 | bootimg_e200.c: PP5022.mi4 $(BIN2C) | ||
50 | @echo BIN2C $< $* | ||
51 | $(SILENT)$(BIN2C) $< $* | ||
52 | |||