2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 TARGET_DIR ?
= $(shell pwd
)/
9 CFLAGS
+= -Wall
-W
-D_LARGEFILE64_SOURCE
14 LIBSOURCES
:= sansapatcher.c sansaio-posix.c sansaio-win32.c
15 SOURCES
:= $(LIBSOURCES
) main.c
16 # additional link dependencies for the standalone executable
19 # Releases of sansapatcher are created with "make RELEASE=1". This
20 # enables BOOTOBJS and uses the VERSION string defined in main.c
27 BOOTSRC
= bootimg_c200.c bootimg_e200.c
29 CFLAGS
+= -DWITH_BOOTOBJS
32 include ..
/libtools.make
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
40 $(OBJDIR
)main.o
: $(BOOTSRC
)
41 $(OBJDIR
)sansapatcher-rc.o
: sansapatcher.rc sansapatcher.manifest
42 $(WINDRES
) -i sansapatcher.rc
-o sansapatcher-rc.o
44 bootimg_c200.c
: firmware.mi4
$(BIN2C
)
46 $(SILENT
)$(BIN2C
) $< $*
48 bootimg_e200.c
: PP5022.mi4
$(BIN2C
)
50 $(SILENT
)$(BIN2C
) $< $*