diff options
Diffstat (limited to 'rbutil/e200rpatcher/Makefile')
-rw-r--r-- | rbutil/e200rpatcher/Makefile | 44 |
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 @@ | |||
1 | CFLAGS=-Wall -W | ||
2 | |||
3 | ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) | ||
4 | OUTPUT=e200rpatcher.exe | ||
5 | CROSS= | ||
6 | CFLAGS+=-mno-cygwin | ||
7 | else | ||
8 | OUTPUT=e200rpatcher | ||
9 | CROSS=i586-mingw32msvc- | ||
10 | endif | ||
11 | |||
12 | LIBS = -lusb | ||
13 | |||
14 | NATIVECC = gcc | ||
15 | CC = $(CROSS)gcc | ||
16 | |||
17 | all: $(OUTPUT) | ||
18 | |||
19 | e200rpatcher: e200rpatcher.c bootimg.c | ||
20 | gcc $(CFLAGS) $(LIBS) -o e200rpatcher e200rpatcher.c bootimg.c | ||
21 | strip e200rpatcher | ||
22 | |||
23 | e200rpatcher.exe: e200rpatcher.c bootimg.c | ||
24 | $(CC) $(CFLAGS) $(LIBS) -o e200rpatcher.exe e200rpatcher.c bootimg.c | ||
25 | $(CROSS)strip e200rpatcher.exe | ||
26 | |||
27 | e200rpatcher-mac: e200rpatcher-i386 e200rpatcher-ppc | ||
28 | lipo -create e200rpatcher-ppc e200rpatcher-i386 -output e200rpatcher-mac | ||
29 | e200rpatcher-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 | |||
33 | e200rpatcher-ppc: e200rpatcher.c bootimg.c | ||
34 | gcc -arch ppc $(CFLAGS) $(LIBS) -o e200rpatcher-ppc e200rpatcher.c bootimg.c | ||
35 | strip e200rpatcher-ppc | ||
36 | |||
37 | bin2c: ../sansapatcher/bin2c.c | ||
38 | $(NATIVECC) $(CFLAGS) -o bin2c ../sansapatcher/bin2c.c | ||
39 | |||
40 | bootimg.c: bootloader.bin bin2c | ||
41 | ./bin2c bootloader.bin bootimg | ||
42 | |||
43 | clean: | ||
44 | rm -f e200rpatcher.exe e200rpatcher-mac e200rpatcher-i386 e200rpatcher-ppc e200rpatcher bin2c bootimg.c bootimg.h *~ | ||