aboutsummaryrefslogtreecommitdiffstats
path: root/dosutil
diff options
context:
space:
mode:
Diffstat (limited to 'dosutil')
-rw-r--r--dosutil/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/dosutil/Makefile b/dosutil/Makefile
index 9dc88d1f..69fc58ad 100644
--- a/dosutil/Makefile
+++ b/dosutil/Makefile
@@ -7,6 +7,9 @@ include $(MAKEDIR)/syslinux.mk
WCL = wcl
WCLOPT = -6 -osx -mt -bt=DOS -l=COM
+WCL_IS_GOOD := $(shell $(WCL) $(WCLOPT) \
+ -o hello.exe $(SRC)/../win/hello.c >/dev/null 2>&1 ; echo $$?)
+
UPX = upx
NASM = nasm
@@ -45,7 +48,12 @@ TARGETS = $(WCTARGETS) $(NSTARGETS)
rm -f $*.0*
chmod a-x $@
+ifeq ($(WCL_IS_GOOD),0)
all: $(TARGETS)
+else
+all: $(NSTARGETS)
+ rm -f $(WCTARGETS)
+endif
tidy dist:
-rm -f *.obj *.lst *.o *.0*