We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 216

Summary: Port to Win32 using OpenWatcom 1.5
Product: SDL Reporter: Marc Peter <macpete>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: HG 1.2   
Hardware: x86   
OS: Windows (All)   
Bug Depends on: 215    
Bug Blocks: 230    
Attachments: Archive containing makefile for Watcom-Win32 port
new file README.Watcom for instructions on using Watcom-Win32.zip
slightly fixed Watcom makefiles for 1.2.10 release
updated makefiles for 1.2.11 release
updated README.Watcom for 1.2.11
Update to OpenWatcom makefile for SDL-1.2 branch

Description Marc Peter 2006-05-06 19:38:48 UTC
The attached files allow building the SDL library and tests with the Open Watcom compiler for Windows:
- static library or DLL
- Debug or Release builds available
- uses register calling convention of Open Watcom
- wmake target to build the SDL test samples

Following is a table that shows what works and what doesn't, yet:
checkkeys       +
graywin         +
loopwave        +
testalpha       +
testbitmap      +
testdyngl       +
testerror       +
testfile        +
testgamma       +
testgl          +
testhread       +
testiconv       - (all failed)
testkeys        +
testlock        + (after removing calls to raise() from signal handler)
testoverlay     + (needs 'set SDL_VIDEODRIVER=directx')
testoverlay2    + (-"-)
testpalette     +
testplatform    +
testsem         +
testsprite      +
testtimer       +
testver         +
testvidinfo     +
testwin         - (fading doesn't seem right)
testwm          +
torturethread   +
testcdrom       +
testjoystick    not tested
threadwin       +

TODO:
- make stack calling convention work (has linking issues with dxguid.lib)
- perform testjoystick (I don't have a joystick)
- investigate fading in testwin
- merge with OS/2 port
- add DOS target
Comment 1 Marc Peter 2006-05-06 19:41:54 UTC
Created attachment 113 [details]
Archive containing makefile for Watcom-Win32 port

Extract archive into base SDL directory.
cd watcom
wmake tests
cd ..\test
testgl

The top of the makefile contains available build options for the wmake command.
Comment 2 Sam Lantinga 2006-05-06 23:44:57 UTC
This is in subversion, thanks!
Comment 3 Marc Peter 2006-05-07 05:48:39 UTC
Created attachment 114 [details]
new file README.Watcom for instructions on using Watcom-Win32.zip
Comment 4 Marc Peter 2006-05-13 18:28:04 UTC
Created attachment 128 [details]
slightly fixed Watcom makefiles for 1.2.10 release
Comment 5 Marc Peter 2006-06-25 18:03:01 UTC
Created attachment 142 [details]
updated makefiles for 1.2.11 release

The new Watcom-Win32.zip
- includes the new testcursor test, and
- doesn't link to dxguid.lib anymore (by defining INITGUID for SDL_dx5events.c),
  to fix issue with stack calling convention (-6s can now be used instead of -6r
  in CFLAGS).
Comment 6 Marc Peter 2006-06-25 18:12:08 UTC
Created attachment 143 [details]
updated README.Watcom for 1.2.11

- lists new testcursor test
- mentions possibility to build with -6s (stack calling convention) instead
  of -6r (register calling convention)
Comment 7 Sam Lantinga 2006-06-25 21:34:58 UTC
Got 'em, thanks!
Comment 8 Marc Peter 2006-11-12 16:35:45 UTC
Created attachment 182 [details]
Update to OpenWatcom makefile for SDL-1.2 branch

Update to OpenWatcom makefile for SDL-1.2 branch:
 - create SDL_config.h as copy of SDL_config_win32.h, if missing
 - new target distclean to remove SDL_config.h

Note that this makefile is not suitable for SDL trunk (1.3), because
the object file list is not the same there.