Dave Chapman | 71cdf00 | 2007-10-20 09:11:34 +0000 | [diff] [blame] | 1 | # This contains the file to upload |
| 2 | ROMFILE=player.rom |
| 3 | |
Dave Chapman | 9de9b9d | 2010-05-02 09:54:14 +0000 | [diff] [blame] | 4 | ifndef VERSION |
Amaury Pouly | 2743307 | 2013-09-18 13:05:29 +0200 | [diff] [blame] | 5 | VERSION=$(shell ../../tools/version.sh ../../) |
Dave Chapman | 9de9b9d | 2010-05-02 09:54:14 +0000 | [diff] [blame] | 6 | endif |
| 7 | |
| 8 | CFLAGS=-Wall -W -I/usr/local/include -DVERSION=\"$(VERSION)\" |
Dave Chapman | 71cdf00 | 2007-10-20 09:11:34 +0000 | [diff] [blame] | 9 | |
| 10 | ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) |
| 11 | OUTPUT=tcctool.exe |
| 12 | CROSS= |
| 13 | CFLAGS+=-mno-cygwin |
| 14 | else |
| 15 | OUTPUT=tcctool |
| 16 | CROSS=i586-mingw32msvc- |
| 17 | endif |
| 18 | |
| 19 | LIBS = -lusb |
| 20 | WINLIBS = -I libusb-win32-device-bin-0.1.12.1/include libusb-win32-device-bin-0.1.12.1/lib/dynamic/libusb_dyn.c |
| 21 | |
| 22 | NATIVECC = gcc |
| 23 | CC = $(CROSS)gcc |
| 24 | |
| 25 | all: $(OUTPUT) |
| 26 | |
| 27 | tcctool: tcctool.c |
| 28 | gcc $(CFLAGS) $(LIBS) -o tcctool tcctool.c |
| 29 | strip tcctool |
| 30 | |
| 31 | tcctool.exe: tcctool.c |
| 32 | $(CC) $(CFLAGS) $(WINLIBS) -o tcctool.exe tcctool.c |
| 33 | $(CROSS)strip tcctool.exe |
| 34 | |
| 35 | tcctool-mac: tcctool-i386 tcctool-ppc |
| 36 | lipo -create tcctool-ppc tcctool-i386 -output tcctool-mac |
| 37 | |
| 38 | tcctool-i386: tcctool.c usb.h libusb-i386.a |
| 39 | gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -framework iokit -framework coreservices -arch i386 $(CFLAGS) -o tcctool-i386 tcctool.c -I. libusb-i386.a |
| 40 | strip tcctool-i386 |
| 41 | |
| 42 | tcctool-ppc: tcctool.c usb.h libusb-ppc.a |
| 43 | gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -framework iokit -framework coreservices -arch ppc $(CFLAGS) -o tcctool-ppc tcctool.c -I. libusb-ppc.a |
| 44 | strip tcctool-ppc |
| 45 | |
| 46 | clean: |
| 47 | rm -f tcctool.exe tcctool-mac tcctool-i386 tcctool-ppc tcctool *~ |