summaryrefslogtreecommitdiff
path: root/rbutil/e200rpatcher/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/e200rpatcher/Makefile')
-rw-r--r--rbutil/e200rpatcher/Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/rbutil/e200rpatcher/Makefile b/rbutil/e200rpatcher/Makefile
new file mode 100644
index 0000000000..243b2e6c09
--- /dev/null
+++ b/rbutil/e200rpatcher/Makefile
@@ -0,0 +1,44 @@
1CFLAGS=-Wall -W
2
3ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
4OUTPUT=e200rpatcher.exe
5CROSS=
6CFLAGS+=-mno-cygwin
7else
8OUTPUT=e200rpatcher
9CROSS=i586-mingw32msvc-
10endif
11
12LIBS = -lusb
13
14NATIVECC = gcc
15CC = $(CROSS)gcc
16
17all: $(OUTPUT)
18
19e200rpatcher: e200rpatcher.c bootimg.c
20 gcc $(CFLAGS) $(LIBS) -o e200rpatcher e200rpatcher.c bootimg.c
21 strip e200rpatcher
22
23e200rpatcher.exe: e200rpatcher.c bootimg.c
24 $(CC) $(CFLAGS) $(LIBS) -o e200rpatcher.exe e200rpatcher.c bootimg.c
25 $(CROSS)strip e200rpatcher.exe
26
27e200rpatcher-mac: e200rpatcher-i386 e200rpatcher-ppc
28 lipo -create e200rpatcher-ppc e200rpatcher-i386 -output e200rpatcher-mac
29e200rpatcher-i386: e200rpatcher.c bootimg.c
30 gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -o bin/i386/program -arch i386 $(CFLAGS) $(LIBS) -o e200rpatcher-i386 e200rpatcher.c bootimg.c
31 strip e200rpatcher-i386
32
33e200rpatcher-ppc: e200rpatcher.c bootimg.c
34 gcc -arch ppc $(CFLAGS) $(LIBS) -o e200rpatcher-ppc e200rpatcher.c bootimg.c
35 strip e200rpatcher-ppc
36
37bin2c: ../sansapatcher/bin2c.c
38 $(NATIVECC) $(CFLAGS) -o bin2c ../sansapatcher/bin2c.c
39
40bootimg.c: bootloader.bin bin2c
41 ./bin2c bootloader.bin bootimg
42
43clean:
44 rm -f e200rpatcher.exe e200rpatcher-mac e200rpatcher-i386 e200rpatcher-ppc e200rpatcher bin2c bootimg.c bootimg.h *~