summaryrefslogtreecommitdiff
path: root/rbutil/sansapatcher/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/sansapatcher/Makefile')
-rw-r--r--rbutil/sansapatcher/Makefile44
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 @@
1CFLAGS=-Wall -D_LARGEFILE64_SOURCE
2
3ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
4OUTPUT=sansapatcher.exe
5CROSS=
6CFLAGS+=-mno-cygwin
7else
8OUTPUT=sansapatcher
9CROSS=i586-mingw32msvc-
10endif
11
12NATIVECC = gcc
13CC = $(CROSS)gcc
14
15all: $(OUTPUT)
16
17sansapatcher: 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
21sansapatcher.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
25sansapatcher-mac: sansapatcher-i386 sansapatcher-ppc
26 lipo -create sansapatcher-ppc sansapatcher-i386 -output sansapatcher-mac
27
28sansapatcher-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
32sansapatcher-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
42clean:
43 rm -f sansapatcher.exe sansapatcher-mac sansapatcher-i386 sansapatcher-ppc sansapatcher mi42c *~
44#bootimg.c bootimg.h