rockbox/utils/tcctool/Makefile
Dave Chapman 9de9b9dfbe Take version number from SVN, or via VERSION variable in Makefile - i.e. use "make VERSION=v1.0" to build with that version number.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25774 a1c6a512-1295-4272-9138-f99709370657
2010-05-02 09:54:14 +00:00

47 lines
1.3 KiB
Makefile

# This contains the file to upload
ROMFILE=player.rom
ifndef VERSION
VERSION=$(shell ../../tools/version.sh)
endif
CFLAGS=-Wall -W -I/usr/local/include -DVERSION=\"$(VERSION)\"
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
OUTPUT=tcctool.exe
CROSS=
CFLAGS+=-mno-cygwin
else
OUTPUT=tcctool
CROSS=i586-mingw32msvc-
endif
LIBS = -lusb
WINLIBS = -I libusb-win32-device-bin-0.1.12.1/include libusb-win32-device-bin-0.1.12.1/lib/dynamic/libusb_dyn.c
NATIVECC = gcc
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
clean:
rm -f tcctool.exe tcctool-mac tcctool-i386 tcctool-ppc tcctool *~