Use DBOP to check for left button on C200v2 like we are supposed to instead of right...
[kugel-rb.git] / rbutil / sansapatcher / Makefile
blobbe764c90f4f919f5cb94b48d6ee425473b99a032
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.dmg: sansapatcher-mac
38 mkdir -p sansapatcher-dmg
39 cp -p sansapatcher-mac sansapatcher-dmg/sansapatcher
40 hdiutil create -srcfolder sansapatcher-dmg sansapatcher.dmg
42 sansapatcher-i386: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg_c200.c bootimg_e200.c
43 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
44 strip sansapatcher-i386
46 sansapatcher-ppc: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg_c200.c bootimg_e200.c
47 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
48 strip sansapatcher-ppc
50 bootimg_c200.c: firmware.mi4 ../tools/bin2c
51 ../tools/bin2c firmware.mi4 bootimg_c200
53 bootimg_e200.c: PP5022.mi4 ../tools/bin2c
54 ../tools/bin2c PP5022.mi4 bootimg_e200
56 ../tools/bin2c:
57 make -C ../tools bin2c
59 clean:
60 rm -f sansapatcher.exe sansapatcher-mac sansapatcher-i386 sansapatcher-ppc sansapatcher bootimg_c200.c bootimg_c200.h bootimg_e200.c bootimg_e200.h *~ sansapatcher.dmg
61 rm -rf sansapatcher-dmg