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 *~