Skip to content

Commit dba7aba

Browse files
committed
Various improvements to build files.
* Removed Makefile. Use the MSVC Makefile to build instead. * Removed Visual C++ workspace files. * Use medium memory model for executables. * Disable optimisations in Open Watcom as the executable was crashing with them enabled.
1 parent 20631be commit dba7aba

8 files changed

Lines changed: 219 additions & 181 deletions

File tree

.gitignore

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
# Ignore compiled binaries
1+
# Ignore compiler output
2+
*.bsc
3+
*.crf
4+
*.bnd
25
*.exe
6+
*.lk1
37
*.map
48
*.obj
5-
*.res
9+
*.pdb
10+
*.res
11+
*.sbr
12+
*.sym
13+
14+
# Ignore Visual Studio files
15+
*.aps
16+
*.vcw
17+
*.wsp
18+
19+
# Ignore Watcom files
20+
*.mk
21+
*.mk1

Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

Readme.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## Introduction
1212

13-
This application is an example 16 bit Windows application written in C. It
13+
This application is an example 16 bit Windows application written in C. It
1414
accompanies the
1515
[Building Win16 GUI Applications in C](http://www.transmissionzero.co.uk/computing/win16-apps-in-c/)
1616
article on [Transmission Zero](http://www.transmissionzero.co.uk/).
@@ -24,17 +24,16 @@ which is compatible with Windows 1 and 2 (but not compatible with Windows 9x).
2424
## Building the Application
2525

2626
To build the application from the command line with Microsoft's Visual C++
27-
compilers, open a command prompt, change to the directory containing the
28-
Makefile, and run "nmake". Note that you will need the 16 bit C compiler,
29-
linker, and resource compiler--this won't work with 32 bit compilers! Also note
30-
that the Makefile may require some small modifications if you use a make utility
31-
other than "nmake".
32-
33-
To build the application with the Microsoft Visual C++ GUI, open the
34-
"Win16App.mak" file and build the application. You will need a version of Visual
35-
C++ which supports building Win16 apps, for example Visual C++ 1.52 (available
36-
from [MSDN](https://msdn.microsoft.com/subscriptions/downloads) if you have a
37-
subscription).
27+
16 bit compilers, open a command prompt, change to the directory containing the
28+
project files, and run "nmake /f Win16App.mak". Note that you will need the 16
29+
bit C compiler, linker, and resource compiler--this won't work with 32 bit
30+
compilers! The 16 bit tools can be freely downloaded as part of the
31+
[Windows Server 2003 DDK](http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso).
32+
33+
To build the application with the Microsoft Visual 1.5 C++ GUI, open the
34+
"Win16App.mak" file and build the application. If you have an MSDN subscription,
35+
you can
36+
[download Visual C++ 1.52](https://my.visualstudio.com/Downloads?pid=140).
3837

3938
To build the application in [Open Watcom](http://openwatcom.org/), open the
4039
project up in the IDE, and choose the "Make" option from the "Targets" menu.
@@ -53,6 +52,9 @@ in an application which crashes, so it may be possible to fix this by changing
5352
the compiler options. It runs fine under Windows 3.0 in Standard Mode and 386
5453
Enhanced Mode.
5554

55+
The Open Watcom build of the application has optimisations switched off. With
56+
optimisations, the application crashes on startup.
57+
5658
If you have any other problems or questions, please ensure you have read this
5759
readme file and the
5860
[Building Win16 GUI Applications in C](http://www.transmissionzero.co.uk/computing/win16-apps-in-c/)

WIN16APP.VCW

Lines changed: 0 additions & 6 deletions
This file was deleted.

WIN16APP.WSP

-254 Bytes
Binary file not shown.

WIN16APP.MAK renamed to Win16App.mak

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ D_RCDEFINES = /d_DEBUG
1010
R_RCDEFINES = /dNDEBUG
1111
ORIGIN = MSVC
1212
ORIGIN_VER = 1.00
13+
PROJPATH =
1314
USEMFC = 0
1415
CC = cl
1516
CPP = cl
@@ -21,12 +22,12 @@ CPPUSEPCHFLAG =
2122
FIRSTC = ABOUTDLG.C
2223
FIRSTCPP =
2324
RC = rc
24-
CFLAGS_D_WEXE = /nologo /W3 /Zi /Od /D "_DEBUG" /FR /GA /Fd"WIN16APP.PDB"
25-
CFLAGS_R_WEXE = /nologo /W3 /O1 /D "NDEBUG" /FR /GA
25+
CFLAGS_D_WEXE = /nologo /W3 /Gf /Zi /AM /Od /D "WINVER"="0x0300" /D "_DEBUG" /FR /Gw /Fd"WIN16APP.PDB"
26+
CFLAGS_R_WEXE = /nologo /W3 /Gf /AM /O1 /D "WINVER"="0x0300" /D "NDEBUG" /FR /Gw
2627
LFLAGS_D_WEXE = /NOLOGO /NOD /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE /CO
2728
LFLAGS_R_WEXE = /NOLOGO /NOD /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE
28-
LIBS_D_WEXE = oldnames libw slibcew commdlg.lib olecli.lib olesvr.lib shell.lib
29-
LIBS_R_WEXE = oldnames libw slibcew commdlg.lib olecli.lib olesvr.lib shell.lib
29+
LIBS_D_WEXE = oldnames libw mlibcew commdlg.lib olecli.lib olesvr.lib shell.lib
30+
LIBS_R_WEXE = oldnames libw mlibcew commdlg.lib olecli.lib olesvr.lib shell.lib
3031
RCFLAGS = /nologo
3132
RESFLAGS = /nologo /30
3233
RUNFLAGS =

0 commit comments

Comments
 (0)