diff options
Diffstat (limited to 'rbutil/sansapatcher/Makefile')
-rw-r--r-- | rbutil/sansapatcher/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/rbutil/sansapatcher/Makefile b/rbutil/sansapatcher/Makefile new file mode 100644 index 0000000000..17b3fb0047 --- /dev/null +++ b/rbutil/sansapatcher/Makefile | |||
@@ -0,0 +1,44 @@ | |||
1 | CFLAGS=-Wall -D_LARGEFILE64_SOURCE | ||
2 | |||
3 | ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) | ||
4 | OUTPUT=sansapatcher.exe | ||
5 | CROSS= | ||
6 | CFLAGS+=-mno-cygwin | ||
7 | else | ||
8 | OUTPUT=sansapatcher | ||
9 | CROSS=i586-mingw32msvc- | ||
10 | endif | ||
11 | |||
12 | NATIVECC = gcc | ||
13 | CC = $(CROSS)gcc | ||
14 | |||
15 | all: $(OUTPUT) | ||
16 | |||
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 | ||
19 | strip sansapatcher | ||
20 | |||
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 | ||
24 | |||
25 | sansapatcher-mac: sansapatcher-i386 sansapatcher-ppc | ||
26 | lipo -create sansapatcher-ppc sansapatcher-i386 -output sansapatcher-mac | ||
27 | |||
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 | ||
31 | |||
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 | ||
35 | |||
36 | #mi42c: mi42c.c | ||
37 | # $(NATIVECC) $(CFLAGS) -o mi42c mi42c.c | ||
38 | |||
39 | #bootimg.c: PP5022.mi4 mi42c | ||
40 | # ./mi42c PP5022.mi4 bootimg | ||
41 | |||
42 | clean: | ||
43 | rm -f sansapatcher.exe sansapatcher-mac sansapatcher-i386 sansapatcher-ppc sansapatcher mi42c *~ | ||
44 | #bootimg.c bootimg.h | ||