S5L8700: fix buttons used in debug menu
[kugel-rb.git] / rbutil / e200rpatcher / Makefile
blob8ca0b0aad008aebd308fcdfe452089fa05e2c4d7
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.dmg: e200rpatcher-mac
36 mkdir e200rpatcher-dmg
37 cp e200rpatcher-mac e200rpatcher-dmg
38 hdiutil create -srcfolder e200rpatcher-dmg e200rpatcher.dmg
40 e200rpatcher-i386: e200rpatcher.c bootimg.c usb.h libusb-i386.a
41 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
42 strip e200rpatcher-i386
44 e200rpatcher-ppc: e200rpatcher.c bootimg.c usb.h libusb-ppc.a
45 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
46 strip e200rpatcher-ppc
48 bin2c: ../tools/bin2c.c
49 $(NATIVECC) $(CFLAGS) -o bin2c ../tools/bin2c.c
51 bootimg.c: bootloader.bin bin2c
52 ./bin2c bootloader.bin bootimg
54 clean:
55 rm -f e200rpatcher.exe e200rpatcher-mac e200rpatcher-i386 e200rpatcher-ppc e200rpatcher bin2c bootimg.c bootimg.h *~ e200rpatcher.dmg
56 rm -rf e200rpatcher-dmg