3 ifeq ($(findstring CYGWIN
,$(shell uname
)),CYGWIN
)
4 OUTPUT
=e200rpatcher.exe
9 CROSS
=i586-mingw32msvc-
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
17 WINDRES
= $(CROSS
)windres
21 e200rpatcher
: e200rpatcher.c bootimg.c
22 gcc
$(CFLAGS
) $(LIBS
) -o e200rpatcher e200rpatcher.c bootimg.c
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
50 rm -f e200rpatcher.exe e200rpatcher-mac e200rpatcher-i386 e200rpatcher-ppc e200rpatcher bin2c bootimg.c bootimg.h
*~