Initial support for building for Windows with OpenWatcom

This commit is contained in:
Cameron Cawley
2022-05-18 20:20:03 +01:00
committed by Ozkan Sezer
parent 5ef36ead08
commit 9dfa000bc0
12 changed files with 346 additions and 38 deletions

17
test/Makefile.w32 Normal file
View File

@@ -0,0 +1,17 @@
# Open Watcom makefile to build SDL2 tests for Win32
# wmake -f Makefile.w32
SYSTEM = nt
INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h" -I"../src/video/khronos"
CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
CFLAGS+= -wx -wcd=303
CFLAGS+= -DSDL_MAIN_HANDLED
CFLAGS+= -DHAVE_OPENGL
GLLIBS = opengl32.lib
TNSRCS = testnative.obj testnativew32.obj
!include watcom.mif

View File

@@ -56,6 +56,17 @@ else
not_ok "Makefile.os2 $version disagrees with SDL_version.h $ref_version"
fi
major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.w32)
minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.w32)
micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.w32)
version="${major}.${minor}.${micro}"
if [ "$ref_version" = "$version" ]; then
ok "Makefile.w32 $version"
else
not_ok "Makefile.w32 $version disagrees with SDL_version.h $ref_version"
fi
version=$(sed -Ene 's/^[$]SDLVersion = "([0-9.]+)"\r?$/\1/p' build-scripts/winrtbuild.ps1)
if [ "$ref_version" = "$version" ]; then

View File

@@ -64,6 +64,9 @@ testoverlay2.exe: testoverlay2.obj testyuv_cvt.obj
testyuv.exe: testyuv.obj testyuv_cvt.obj
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
testshader.exe: testshader.obj
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS) $(GLLIBS)} op q op el file {$<} name $@
testime.exe: testime.obj
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS) $(TTFLIBS)} op q op el file {$<} name $@