From c9a11d534dba6384126d1339a1feb38533af394d Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Mon, 12 May 2008 18:30:18 +0000 Subject: [PATCH] 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 --- tools/checkwps/Makefile | 16 +++++++++++++--- tools/checkwps/buildall.sh | 2 +- 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 )