path: root/utils/tcctool/Makefile
diff options
authorDave Chapman <>2007-10-20 09:11:34 +0000
committerDave Chapman <>2007-10-20 09:11:34 +0000
commit71cdf0043740361416df97a432dc4f0da225a099 (patch)
tree0543240d83edf25dfdb59c269c2f49223af27c67 /utils/tcctool/Makefile
parent87f5359d604a3d51526965a97c74896f392ed444 (diff)
Initial version of tcctool - a utility for talking to Telechips TCC77x-based devices in USB boot mode, allowing code to be uploaded to RAM and run via USB, without any danger of bricking. When your uploaded code crashes, just power-cycle the device and it is back to normal. Requires libusb.
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/tcctool/Makefile')
1 files changed, 43 insertions, 0 deletions
diff --git a/utils/tcctool/Makefile b/utils/tcctool/Makefile
new file mode 100644
index 0000000000..4e1ec476ab
--- /dev/null
+++ b/utils/tcctool/Makefile
@@ -0,0 +1,43 @@
+# This contains the file to upload
+CFLAGS=-Wall -W -I/usr/local/include
+ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
+LIBS = -lusb
+WINLIBS = -I libusb-win32-device-bin- libusb-win32-device-bin-
+CC = $(CROSS)gcc
+all: $(OUTPUT)
+tcctool: tcctool.c
+ gcc $(CFLAGS) $(LIBS) -o tcctool tcctool.c
+ strip tcctool
+tcctool.exe: tcctool.c
+ $(CC) $(CFLAGS) $(WINLIBS) -o tcctool.exe tcctool.c
+ $(CROSS)strip tcctool.exe
+tcctool-mac: tcctool-i386 tcctool-ppc
+ lipo -create tcctool-ppc tcctool-i386 -output tcctool-mac
+tcctool-i386: tcctool.c usb.h libusb-i386.a
+ gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -framework iokit -framework coreservices -arch i386 $(CFLAGS) -o tcctool-i386 tcctool.c -I. libusb-i386.a
+ strip tcctool-i386
+tcctool-ppc: tcctool.c usb.h libusb-ppc.a
+ gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -framework iokit -framework coreservices -arch ppc $(CFLAGS) -o tcctool-ppc tcctool.c -I. libusb-ppc.a
+ strip tcctool-ppc
+ rm -f tcctool.exe tcctool-mac tcctool-i386 tcctool-ppc tcctool *~