fix red and remove tabs
[kugel-rb.git] / rbutil / e200rpatcher / Makefile
blob2cf150005864660a885fc2df620ae2e0ffe553b2
1 CFLAGS=-Wall -W
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
12 LIBS = -lusb
13 WINLIBS = -I libusb-win32-device-bin-0.1.12.1/include libusb-win32-device-bin-0.1.12.1/lib/dynamic/libusb_dyn.c
15 NATIVECC = gcc
16 CC = $(CROSS)gcc
17 WINDRES = $(CROSS)windres
19 all: $(OUTPUT)
21 e200rpatcher: e200rpatcher.c bootimg.c
22 gcc $(CFLAGS) $(LIBS) -o e200rpatcher e200rpatcher.c bootimg.c
23 strip e200rpatcher
25 e200rpatcher.exe: e200rpatcher.c bootimg.c e200rpatcher-rc.o
26 $(CC) $(CFLAGS) $(WINLIBS) -o e200rpatcher.exe e200rpatcher.c bootimg.c e200rpatcher-rc.o
27 $(CROSS)strip e200rpatcher.exe
29 e200rpatcher-rc.o: e200rpatcher.rc e200rpatcher.manifest
30 $(WINDRES) -i e200rpatcher.rc -o e200rpatcher-rc.o
32 e200rpatcher-mac: e200rpatcher-i386 e200rpatcher-ppc
33 lipo -create e200rpatcher-ppc e200rpatcher-i386 -output e200rpatcher-mac
35 e200rpatcher-i386: e200rpatcher.c bootimg.c usb.h libusb-i386.a
36 gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -framework iokit -framework coreservices -arch i386 $(CFLAGS) -o e200rpatcher-i386 e200rpatcher.c bootimg.c -I. libusb-i386.a
37 strip e200rpatcher-i386
39 e200rpatcher-ppc: e200rpatcher.c bootimg.c usb.h libusb-ppc.a
40 gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -framework iokit -framework coreservices -arch ppc $(CFLAGS) -o e200rpatcher-ppc e200rpatcher.c bootimg.c -I. libusb-ppc.a
41 strip e200rpatcher-ppc
43 bin2c: ../sansapatcher/bin2c.c
44 $(NATIVECC) $(CFLAGS) -o bin2c ../sansapatcher/bin2c.c
46 bootimg.c: bootloader.bin bin2c
47 ./bin2c bootloader.bin bootimg
49 clean:
50 rm -f e200rpatcher.exe e200rpatcher-mac e200rpatcher-i386 e200rpatcher-ppc e200rpatcher bin2c bootimg.c bootimg.h *~