From 7170a00daad917993d3fed460f1122f543d2b0ea Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 5 Feb 2007 00:50:49 +0000 Subject: Enable building ipodpatcher (pure win32 binary) on cygwin with a simple 'make' git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12202 a1c6a512-1295-4272-9138-f99709370657 --- tools/ipodpatcher/Makefile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'tools/ipodpatcher/Makefile') diff --git a/tools/ipodpatcher/Makefile b/tools/ipodpatcher/Makefile index 21994de754..d796f4494c 100644 --- a/tools/ipodpatcher/Makefile +++ b/tools/ipodpatcher/Makefile @@ -1,11 +1,23 @@ -all: ipodpatcher +CFLAGS=-Wall + +ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) +OUTPUT=ipodpatcher.exe +CROSS= +CFLAGS+=-mno-cygwin +else +OUTPUT=ipodpatcher +CROSS=i586-mingw32msvc- +endif + +all: $(OUTPUT) ipodpatcher: ipodpatcher.c ipodio-posix.c parttypes.h - gcc -Wall -o ipodpatcher ipodpatcher.c ipodio-posix.c + gcc $(CFLAGS) -o ipodpatcher ipodpatcher.c ipodio-posix.c + strip ipodpatcher ipodpatcher.exe: ipodpatcher.c ipodio-win32.c parttypes.h - i586-mingw32msvc-gcc -Wall -o ipodpatcher.exe ipodpatcher.c ipodio-win32.c - i586-mingw32msvc-strip ipodpatcher.exe + $(CROSS)gcc $(CFLAGS) -o ipodpatcher.exe ipodpatcher.c ipodio-win32.c + $(CROSS)strip ipodpatcher.exe clean: rm -f ipodpatcher.exe ipodpatcher *~ -- cgit