sdl12-compat: updates for watcom optimization flags

From b0e6fa1cc643b6c57563ac581f40278a7c367291 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 18 Jan 2022 14:31:40 +0300
Subject: [PATCH] updates for watcom optimization flags

---
 src/Makefile.os2 | 19 +++++++++++--------
 src/Makefile.w32 | 20 ++++++++++++--------
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/src/Makefile.os2 b/src/Makefile.os2
index 1f4080f..ca832ad 100644
--- a/src/Makefile.os2
+++ b/src/Makefile.os2
@@ -16,18 +16,21 @@ DLLFILE = $(LIBNAME).dll
 LIBFILE = $(LIBNAME).lib
 LNKFILE = $(LIBNAME).lnk
 
-CFLAGS_DEF=-bt=os2 -d0 -zq -bm -5s -fp5 -fpi87 -sg -oteanbmier $(INCPATH)
-CFLAGS_DEF+= -DNDEBUG -DSDL_DISABLE_IMMINTRIN_H
-# for DECLSPEC
-CFLAGS_DEF+= -DBUILD_SDL
-CFLAGS_DLL=$(CFLAGS_DEF) -bd
-
-# Special flags for building SDL
-CFLAGS=$(CFLAGS_DLL) -otexan -wx -ei
+CFLAGS = -bt=os2 -d0 -zq -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
+# max warnings:
+CFLAGS+= -wx
 # avoid bogus W200 from cpuid code
 CFLAGS+= -wcd=200
 # newer OpenWatcom versions enable W303 by default
 CFLAGS+= -wcd=303
+# the include paths :
+CFLAGS+= $(INCPATH)
+# building dll:
+CFLAGS+= -bd
+# for DECLSPEC
+CFLAGS+= -DBUILD_SDL
+# misc
+CFLAGS+= -DNDEBUG -DSDL_DISABLE_IMMINTRIN_H
 
 DESCRIPTION = Simple DirectMedia Layer 1.2
 
diff --git a/src/Makefile.w32 b/src/Makefile.w32
index d85018a..543e078 100644
--- a/src/Makefile.w32
+++ b/src/Makefile.w32
@@ -16,18 +16,22 @@ DLLFILE = $(LIBNAME).dll
 LIBFILE = $(LIBNAME).lib
 LNKFILE = $(LIBNAME).lnk
 
-CFLAGS_DEF=-bt=nt -d0 -zq -bm -5s -fp5 -fpi87 -sg -oteanbmier $(INCPATH)
-CFLAGS_DEF+= -DNDEBUG -DSDL_DISABLE_IMMINTRIN_H
-# we override the DECLSPEC define in begin_code.h, because we are using
-# an exports file to remove the _cdecl '_' prefix from the symbol names
-CFLAGS_DLL=$(CFLAGS_DEF) -bd -DDECLSPEC=
-
-# Special flags for building SDL
-CFLAGS=$(CFLAGS_DLL) -otexan -wx -ei
+CFLAGS =-bt=nt -d0 -zq -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
+# max warnings:
+CFLAGS+= -wx
 # avoid bogus W200 from cpuid code
 CFLAGS+= -wcd=200
 # newer OpenWatcom versions enable W303 by default
 CFLAGS+= -wcd=303
+# the include paths :
+CFLAGS+= $(INCPATH)
+# building dll:
+CFLAGS+= -bd
+# we override the DECLSPEC define in begin_code.h, because we are using
+# an exports file to remove the _cdecl '_' prefix from the symbol names
+CFLAGS+= -DDECLSPEC=
+# misc
+CFLAGS+= -DNDEBUG -DSDL_DISABLE_IMMINTRIN_H
 
 object_files= SDL12_compat.obj
 resource_obj= version.res