diff options
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 | |||