Minor comment change. FS #9234.
[kugel-rb.git] / rbutil / sansapatcher / Makefile
blob9c5bec1bdf4fdc4d999c1e9211f8f5dcf4e5cad9
1 CFLAGS=-Wall -W -D_LARGEFILE64_SOURCE
3 ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
4 OUTPUT=sansapatcher.exe
5 CROSS=
6 CFLAGS+=-mno-cygwin
7 else
8 ifeq ($(findstring MINGW,$(shell uname)),MINGW)
9 OUTPUT=sansapatcher.exe
10 CROSS=
11 else
12 OUTPUT=sansapatcher
13 CROSS=i586-mingw32msvc-
14 endif
15 endif
17 NATIVECC = gcc
18 CC = $(CROSS)gcc
19 WINDRES = $(CROSS)windres
21 all: $(OUTPUT)
23 sansapatcher: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg_c200.c bootimg_e200.c
24 gcc $(CFLAGS) -o sansapatcher main.c sansapatcher.c sansaio-posix.c bootimg_c200.c bootimg_e200.c
25 strip sansapatcher
27 sansapatcher.exe: main.c sansapatcher.c sansaio-win32.c parttypes.h bootimg_c200.c bootimg_e200.c sansapatcher-rc.o
28 $(CC) $(CFLAGS) -o sansapatcher.exe main.c sansapatcher.c sansaio-win32.c bootimg_c200.c bootimg_e200.c sansapatcher-rc.o
29 $(CROSS)strip sansapatcher.exe
31 sansapatcher-rc.o: sansapatcher.rc sansapatcher.manifest
32 $(WINDRES) -i sansapatcher.rc -o sansapatcher-rc.o
34 sansapatcher-mac: sansapatcher-i386 sansapatcher-ppc
35 lipo -create sansapatcher-ppc sansapatcher-i386 -output sansapatcher-mac
37 sansapatcher-i386: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg_c200.c bootimg_e200.c
38 gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 $(CFLAGS) -o sansapatcher-i386 main.c sansapatcher.c sansaio-posix.c bootimg_c200.c bootimg_e200.c
39 strip sansapatcher-i386
41 sansapatcher-ppc: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg_c200.c bootimg_e200.c
42 gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch ppc $(CFLAGS) -o sansapatcher-ppc main.c sansapatcher.c sansaio-posix.c bootimg_c200.c bootimg_e200.c
43 strip sansapatcher-ppc
45 bin2c: bin2c.c
46 $(NATIVECC) $(CFLAGS) -o bin2c bin2c.c
48 bootimg_c200.c: firmware.mi4 bin2c
49 ./bin2c firmware.mi4 bootimg_c200
51 bootimg_e200.c: PP5022.mi4 bin2c
52 ./bin2c PP5022.mi4 bootimg_e200
54 clean:
55 rm -f sansapatcher.exe sansapatcher-mac sansapatcher-i386 sansapatcher-ppc sansapatcher bin2c bootimg_c200.c bootimg_c200.h bootimg_e200.c bootimg_e200.h *~