[syslinux] [PATCH 2/2] Test for Watcom C presence

Lubomir Rintel lkundrak at v3.sk
Tue Jun 24 03:22:22 PDT 2014


This adds checks for Watcom C DOS cross-compiler in a manner analogous to mingw
compiler for Windows. The compiler is not commonly present in Linux distributions
due to a non-free license.

Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
---
 dosutil/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dosutil/Makefile b/dosutil/Makefile
index 9dc88d1..69fc58a 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*
-- 
1.8.3.1



More information about the Syslinux mailing list