diff --git a/hdr/portab.h b/hdr/portab.h index 188bf09..b178aa2 100644 --- a/hdr/portab.h +++ b/hdr/portab.h @@ -77,7 +77,7 @@ void __emit__(char, ...); #define enable() __emit__(0xfb) #endif -#elif defined (_MSC_VER) +#elif defined(_MSC_VER) #define I86 #define asm __asm @@ -100,14 +100,11 @@ static unsigned short __inline getSS(void) asm mov ax, ss; } -#elif defined(__WATCOMC__) && defined(BUILD_UTILS) - /* workaround for building some utils with OpenWatcom (owcc) */ -#define MC68K #elif defined(__WATCOMC__) /* don't know a better way */ #if defined(_M_I86) + #define I86 -#endif #define __int__(intno) asm int intno; void disable(void); #pragma aux disable = "cli" modify exact []; @@ -131,10 +128,11 @@ unsigned short getSS(void); /* enable Possible loss of precision warning for compatibility with Borland */ #pragma enable_message(130) -#if _M_IX86 >= 300 || defined(M_I386) -#ifndef I386 -#define I386 -#endif +#else + +/* workaround for building some utils with OpenWatcom (flat model) */ +#define MC68K + #endif #elif defined (_MYMC68K_COMILER_) diff --git a/mkfiles/owlinux.mak b/mkfiles/owlinux.mak index f9a297a..2d98eb6 100644 --- a/mkfiles/owlinux.mak +++ b/mkfiles/owlinux.mak @@ -12,7 +12,7 @@ CP=cp ECHOTO=echo>> INITPATCH=@echo > /dev/null CLDEF=1 -CLT=gcc -Wall -DDOSC_TIME_H -I../hdr -o $@ +CLT=wcl386 -bcl=linux -DDOSC_TIME_H -I../hdr -fe=$@ -I$(COMPILERPATH)/lh CLC=$(CLT) CFLAGST=-fo=.obj $(CFLAGST) ALLCFLAGS=-fo=.obj $(ALLCFLAGS) diff --git a/mkfiles/owwin.mak b/mkfiles/owwin.mak index 34414a5..79ee7c4 100644 --- a/mkfiles/owwin.mak +++ b/mkfiles/owwin.mak @@ -7,13 +7,13 @@ include "../mkfiles/watcom.mak" DIRSEP=\ -INCLUDEPATH=$(COMPILERPATH)$(DIRSEP)h +INCLUDEPATH=$(COMPILERPATH)\h #RM=del 2>nul #CP=copy #ECHOTO=echo>> #INITPATCH=@echo > nul CLDEF=1 -CLT=owcc -DDOSC_TIME_H -DBUILD_UTILS -I../hdr -o $@ +CLT=wcl386 -bcl=nt -DDOSC_TIME_H -I..\hdr -fe=$@ -I$(COMPILERPATH)\h -I$(COMPILERPATH)\h\nt CLC=$(CLT) CFLAGST=-fo=.obj $(CFLAGST) ALLCFLAGS=-fo=.obj $(ALLCFLAGS) diff --git a/mkfiles/watcom.mak b/mkfiles/watcom.mak index e461688..fe68c5a 100644 --- a/mkfiles/watcom.mak +++ b/mkfiles/watcom.mak @@ -61,7 +61,7 @@ MATH_INSERT=+i4m # -3 optimization for 386 - given in CONFIG.MAK, not here # -ALLCFLAGS=-I..$(DIRSEP)hdr $(TARGETOPT) $(ALLCFLAGS)-zq-os-s-e5-j-zl-zp1-wx-we-zgf-zff-r +ALLCFLAGS=-I..$(DIRSEP)hdr $(TARGETOPT) $(ALLCFLAGS) -zq-os-s-e5-j-zl-zp1-wx-we-zgf-zff-r INITCFLAGS=$(ALLCFLAGS)-ntINIT_TEXT-gTGROUP-ndI CFLAGS=$(ALLCFLAGS)-ntHMA_TEXT diff --git a/utils/patchobj.c b/utils/patchobj.c index 72d9870..8708089 100644 --- a/utils/patchobj.c +++ b/utils/patchobj.c @@ -13,7 +13,7 @@ *****************************************************************************/ #include -#ifdef __GNUC__ +#if defined(__GNUC__) || defined(__WATCOMC__) #include #else #include