summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-02-05 00:50:49 +0000
committerJens Arnold <amiconn@rockbox.org>2007-02-05 00:50:49 +0000
commit7170a00daad917993d3fed460f1122f543d2b0ea (patch)
tree6e559d074af424f9b001c76a3e192cc4f6dec9c3
parent1eff300f18012badab1803fc8b947cee334813ee (diff)
downloadrockbox-7170a00daad917993d3fed460f1122f543d2b0ea.tar.gz
rockbox-7170a00daad917993d3fed460f1122f543d2b0ea.tar.bz2
rockbox-7170a00daad917993d3fed460f1122f543d2b0ea.zip
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
-rw-r--r--tools/ipodpatcher/Makefile20
1 files changed, 16 insertions, 4 deletions
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 *~