Introduce emmctools for the sony nwz players.
[maemo-rb.git] / rbutil / sansapatcher / Makefile
blob88b3b6534520d7e6da5a4e0bfad5ffc8175ca5bb
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
8 TARGET_DIR ?= $(shell pwd)/
9 CFLAGS += -Wall -W -D_LARGEFILE64_SOURCE
11 OUTPUT = sansapatcher
13 # inputs
14 LIBSOURCES := sansapatcher.c sansaio-posix.c sansaio-win32.c
15 SOURCES := $(LIBSOURCES) main.c
16 # additional link dependencies for the standalone executable
17 EXTRADEPS :=
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
26 ifdef WITH_BOOTOBJS
27 BOOTSRC = bootimg_c200.c bootimg_e200.c
28 SOURCES += $(BOOTSRC)
29 CFLAGS += -DWITH_BOOTOBJS
30 endif
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
38 endif
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)
45 @echo BIN2C $<
46 $(SILENT)$(BIN2C) $< $*
48 bootimg_e200.c: PP5022.mi4 $(BIN2C)
49 @echo BIN2C $< $*
50 $(SILENT)$(BIN2C) $< $*