1 CFLAGS
=-Wall
-W
-D_LARGEFILE64_SOURCE
3 ifeq ($(findstring CYGWIN
,$(shell uname
)),CYGWIN
)
4 OUTPUT
=sansapatcher.exe
9 CROSS
=i586-mingw32msvc-
17 sansapatcher
: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg.c
18 gcc
$(CFLAGS
) -o sansapatcher main.c sansapatcher.c sansaio-posix.c bootimg.c
21 sansapatcher.exe
: main.c sansapatcher.c sansaio-win32.c parttypes.h bootimg.c
22 $(CC
) $(CFLAGS
) -o sansapatcher.exe main.c sansapatcher.c sansaio-win32.c bootimg.c
23 $(CROSS
)strip sansapatcher.exe
25 sansapatcher-mac
: sansapatcher-i386 sansapatcher-ppc
26 lipo
-create sansapatcher-ppc sansapatcher-i386
-output sansapatcher-mac
28 sansapatcher-i386
: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg.c
29 gcc
-isysroot
/Developer
/SDKs
/MacOSX10.4u.sdk
-o bin
/i386
/program
-arch i386
$(CFLAGS
) -o sansapatcher-i386 main.c sansapatcher.c sansaio-posix.c bootimg.c
30 strip sansapatcher-i386
32 sansapatcher-ppc
: main.c sansapatcher.c sansaio-posix.c parttypes.h bootimg.c
33 gcc
-arch ppc
$(CFLAGS
) -o sansapatcher-ppc main.c sansapatcher.c sansaio-posix.c bootimg.c
34 strip sansapatcher-ppc
37 $(NATIVECC
) $(CFLAGS
) -o bin2c bin2c.c
39 bootimg.c
: PP5022.mi4 bin2c
40 .
/bin2c PP5022.mi4 bootimg
43 rm -f sansapatcher.exe sansapatcher-mac sansapatcher-i386 sansapatcher-ppc sansapatcher bin2c bootimg.c bootimg.h
*~