summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-05-12 18:30:18 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-05-12 18:30:18 +0000
commitc9a11d534dba6384126d1339a1feb38533af394d (patch)
tree745aa5122b306d48e68d5b2aca550739cbcf6269 /tools
parentd03d4f36f343f6669adbbdb87aa19b2b9170cdd7 (diff)
downloadrockbox-c9a11d534dba6384126d1339a1feb38533af394d.tar.gz
rockbox-c9a11d534dba6384126d1339a1feb38533af394d.tar.bz2
rockbox-c9a11d534dba6384126d1339a1feb38533af394d.zip
extend Makefile to allow building checkwps on cygwin and MinGW. Make make call a bit easier -- no need to pass the model twice.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17477 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/checkwps/Makefile16
-rwxr-xr-xtools/checkwps/buildall.sh2
2 files changed, 14 insertions, 4 deletions
diff --git a/tools/checkwps/Makefile b/tools/checkwps/Makefile
index 3da56f9d82..bf029716ec 100644
--- a/tools/checkwps/Makefile
+++ b/tools/checkwps/Makefile
@@ -9,6 +9,16 @@
ROOT=../..
+ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
+CFLAGS+=-mno-cygwin
+ext = .exe
+else
+ifeq ($(findstring MINGW,$(shell uname)),MINGW)
+EXT = .exe
+CC = mingw32-gcc
+endif
+endif
+
COMMON=$(ROOT)/apps/gui/wps_parser.c \
$(ROOT)/apps/gui/wps_debug.c \
$(ROOT)/apps/misc.c \
@@ -24,9 +34,9 @@ CFLAGS = -g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\"
all:
@echo To build, run the buildall.sh script
-checkwps.$(MODEL): checkwps.c $(COMMON)
+checkwps: checkwps.c $(COMMON)
@echo CC [$(TARGET)]
- @$(CC) $(INCLUDE) $(CFLAGS) $(COMMON) -D$(TARGET) checkwps.c -o $@
+ @$(CC) $(INCLUDE) $(CFLAGS) $(COMMON) -D$(TARGET) checkwps.c -o $@.$(MODEL)$(EXT)
clean:
- rm -f checkwps.$(MODEL)
+ rm -f checkwps.$(MODEL)$(EXT)
diff --git a/tools/checkwps/buildall.sh b/tools/checkwps/buildall.sh
index 732c11b2b3..23fc7ff7f4 100755
--- a/tools/checkwps/buildall.sh
+++ b/tools/checkwps/buildall.sh
@@ -3,6 +3,6 @@ cat targets.txt | (
while read target model
do
rm -f checkwps.$model
- make MODEL=$model TARGET=$target checkwps.$model
+ make MODEL=$model TARGET=$target checkwps
done
)