diff options
-rw-r--r-- | tools/checkwps/Makefile | 16 | ||||
-rwxr-xr-x | 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 ) |