1 #############################################################################
3 # SciTech Multi-platform Graphics Library
5 # ========================================================================
7 # The contents of this file are subject to the SciTech MGL Public
8 # License Version 1.0 (the "License"); you may not use this file
9 # except in compliance with the License. You may obtain a copy of
10 # the License at http://www.scitechsoft.com/mgl-license.txt
12 # Software distributed under the License is distributed on an
13 # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14 # implied. See the License for the specific language governing
15 # rights and limitations under the License.
17 # The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
19 # The Initial Developer of the Original Code is SciTech Software, Inc.
20 # All Rights Reserved.
22 # ========================================================================
24 # Descripton: Generic DMAKE startup makefile definitions file. Assumes
25 # that the SCITECH environment variable has been set to point
26 # to where all our stuff is installed. You should not need
27 # to change anything in this file.
29 # Watcom C++ 10.x 32 bit version. Supports Rational's DOS4GW
30 # DOS Extender, PMODE/W, Causeway, FlashTek's X32-VM,
31 # Phar Lap's TNT DOS Extender, 32-bit Windows development and
32 # 32-bit OS/2 development.
34 #############################################################################
36 # Include standard startup script definitions
38 .INCLUDE
: "$(SCITECH)\makedefs\startup.mk"
40 # Import enivornment variables that we use
41 .IMPORT .IGNORE
: USE_TNT USE_X32 USE_X32VM USE_PMODEW STKCALL USE_CAUSEWAY
42 .IMPORT .IGNORE
: USE_WIN386 USE_OS232 USE_OS2GUI WC_LIBBASE NOOPT DOSSTYLE
43 .IMPORT .IGNORE
: OS2_SHELL USE_CODEVIEW USE_DOS32A USE_QNX4 LEAVE_LINKFILE
45 # We are compiling for a 32 bit envionment
48 # Setup special environment for QNX 4 (Unix'ish)
52 LP
:= lib
# LP - Library file prefix (name of file on disk)
53 LL
:= lib
# Library link prefix (name of library on link command line)
54 LE
:= .a
# Library link suffix (extension of library on link command line)
57 # Default commands for compiling, assembling linking and archiving
60 CFLAGS
:= -zq-j-s-fpi87
63 ASFLAGS
:= -t
-f obj
-d__FLAT__
-dSTDCALL_MANGLE
-iINCLUDE
-i
$(SCITECH
)\INCLUDE
75 ASFLAGS
:= /t
/mx
/m
/w-res
/w-mcp
/D__FLAT__
/DSTDCALL_MANGLE
/iINCLUDE
/i
$(SCITECH
)\INCLUDE
77 GAS_FLAGS
:= -D__WATCOMC__
-D__SW_3S
-D__SW_S
-U__GNUC__
-UDJGPP
-U__unix__
-Wall
-I.
-I
$(SCITECH
)\
include -x assembler-with-cpp
90 CFLAGS
+= -D__OS2_PM__
101 # Set the compiler warning level
108 # Optionally turn on debugging information (Codeview format)
113 LDFLAGS
+= D CODEVIEW OPT CVPACK
124 ASFLAGS
+= -F borland
-g
127 ASFLAGS
+= /q
# TASM32 fucks up Watcom C++ debug info
129 ASFLAGS
+= /q
# TASM for OS/2 fucks up Watcom C++ debug info
142 # Optionally turn on optimisations (with or without stack conventions)
145 CFLAGS
+= -onatx-5s-fp5
147 CFLAGS
+= -onaslmr-5s-fp5
155 CFLAGS
+= -onatx-5r-fp5
157 CFLAGS
+= -onaslmr-5r-fp5
163 # Optionally turn on direct i387 FPU instructions optimised for Pentium
169 # Optionally compile a beta release version of a product
175 .IF
$(USE_TNT
) # Use Phar Lap's TNT DOS Extender
176 CFLAGS
+= -bt
=nt
-DTNT
178 LDFLAGS
+= SYS NT OP STUB
=GOTNT.EXE
180 .ELIF
$(USE_X32VM
) # Use FlashTek X-32VM DOS extender
184 DX_ASFLAGS
+= -dX32VM
186 .ELIF
$(USE_X32
) # Use FlashTek X-32 DOS extender
190 DX_ASFLAGS
+= -dX32VM
192 .ELIF
$(USE_QNX4
) # Build QNX 4 app
194 LDFLAGS
+= SYS QNX386FLAT OP CASEEXACT OP OFFSET
=40k OP STACK
=32k
195 CFLAGS
+= -D__QNX__
-D__UNIX__
196 ASFLAGS
+= -d__QNX__
-d__UNIX__
200 CFLAGS
+= -bm-bd-bt
=os2-sg-DBUILD_DLL
201 ASFLAGS
+= -dBUILD_DLL
203 CFLAGS
+= -bm-bt
=os2-sg
205 DX_ASFLAGS
+= -d__OS2__
207 .ELIF
$(USE_SNAP
) # Build 32 bit Snap app
209 CFLAGS
+= -bm-bd-bt
=nt-DBUILD_DLL
210 ASFLAGS
+= -dBUILD_DLL
212 CFLAGS
+= -bm-bt
=nt-D_WIN32
214 LDFLAGS
+= OP nodefaultlibs
216 DEFLIBS
:= clib3s.lib
,math3s.lib
,noemu387.lib
,
218 DEFLIBS
:= clib3r.lib
,math3r.lib
,noemu387.lib
,
221 .ELIF
$(USE_WIN32
) # Build 32 bit Windows NT app
224 CFLAGS
+= -D__CONSOLE__
227 CFLAGS
+= -bm-bd-bt
=nt-sg-DBUILD_DLL
-D_WIN32
228 ASFLAGS
+= -dBUILD_DLL
230 CFLAGS
+= -bm-bt
=nt-sg-D_WIN32
232 DX_ASFLAGS
+= -d__WINDOWS32__
234 DEFLIBS
:= kernel32.lib
,user32.lib
,gdi32.lib
,advapi32.lib
,shell32.lib
,winmm.lib
,comdlg32.lib
,comctl32.lib
,ole32.lib
,oleaut32.lib
,version.lib
,winspool.lib
,uuid.lib
,wsock32.lib
,rpcrt4.lib
,
235 .ELIF
$(USE_WIN386
) # Build 32 bit Win386 extended app
237 CFLAGS
+= -bd-bt
=windows-DBUILD_DLL
238 ASFLAGS
+= -dBUILD_DLL
240 CFLAGS
+= -bt
=windows
242 DX_ASFLAGS
+= -d__WIN386__
244 .ELIF
$(USE_PMODEW
) # PMODE/W
248 LDFLAGS
+= SYS PMODEW
249 DX_CFLAGS
+= -DDOS4GW
250 DX_ASFLAGS
+= -dDOS4GW
252 .ELIF
$(USE_CAUSEWAY
) # Causeway
256 LDFLAGS
+= SYS CAUSEWAY
257 DX_CFLAGS
+= -DDOS4GW
258 DX_ASFLAGS
+= -dDOS4GW
260 .ELIF
$(USE_DOS32A
) # DOS32/A
264 LDFLAGS
+= SYS DOS32A
265 DX_CFLAGS
+= -DDOS4GW
266 DX_ASFLAGS
+= -dDOS4GW
273 DX_CFLAGS
+= -DDOS4GW
274 DX_ASFLAGS
+= -dDOS4GW
278 # Disable linking to default C runtime library and PM library
281 LDFLAGS
+= OP nodefaultlibs
285 # Place to look for PM library files
287 .IF
$(USE_SNAP
) # Build 32 bit Snap app or dll
317 PMLIB
:= tnt\spm.lib
,
323 PMLIB
:= x32\spm.lib
,
329 PMLIB
:= dos4gw\spm.lib
,
331 PMLIB
:= dos4gw\pm.lib
,
336 # Define the base directory for library files
339 LIB_BASE_DIR
:= $(SCITECH_LIB
)\lib\debug
340 CFLAGS
+= -DCHECKED
=1
342 LIB_BASE_DIR
:= $(SCITECH_LIB
)\lib
\release
345 # Define where to install library files
346 LIB_BASE
:= $(LIB_BASE_DIR
)\
$(LIB_OS
)\
$(WC_LIBBASE
)
347 LIB_DEST
:= $(LIB_BASE
)
351 # Define which file contains our rules