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 # Microsoft Visual C++ 2.x 32 bit version. Supports Phar Lap
30 # TNT DOS Extender and 32 bit Windows development.
32 #############################################################################
34 # Include standard startup script definitions
36 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
38 # Import enivornment variables that we use
39 .IMPORT .IGNORE : TNT_PATH VC_LIBBASE DOSSTYLE USE_TNT USE_RTTARGET MSVCDIR
40 .IMPORT .IGNORE : USE_VXD USE_NTDRV USE_W2KDRV NT_DDKROOT USE_RTTI USE_CPPEXCEPT
42 # We are compiling for a 32 bit envionment
45 # Default commands for compiling, assembling linking and archiving
46 CC := cl # C-compiler and flags
50 ASFLAGS := -t -f win32 -F null -d__FLAT__ -dSTDCALL_MANGLE -iINCLUDE -i$(SCITECH)\INCLUDE
55 AS := tasmx # Assembler and flags
57 AS := tasm # Assembler and flags
59 ASFLAGS := /t /mx /m /D__FLAT__ /DSTDCALL_MANGLE /iINCLUDE /i$(SCITECH)\INCLUDE
65 LDENDFLAGS = -link /INCREMENTAL:NO /DRIVER /SUBSYSTEM:NATIVE,4.00 /VERSION:4.00 /MACHINE:I386 /NODEFAULTLIB /DEBUGTYPE:CV /PDB:NONE /ALIGN:0x20 /BASE:0x10000 /ENTRY:DriverEntry@8
66 #/MERGE:_page=page /MERGE:_text=.text /MERGE:.rdata=.text
68 LDENDFLAGS = -link /INCREMENTAL:NO /DEF:$(@:b).def /SUBSYSTEM:WINDOWS /MACHINE:I386 /DEBUGTYPE:CV /PDB:NONE
70 LDENDFLAGS = -link /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MACHINE:I386 /DEBUGTYPE:CV /PDB:NONE
74 LDENDFLAGS := -link -stub:$(TNT_PATH:s/\/\\)\\bin\\gotnt.exe /PDB:NONE
76 RC := rc # Watcom resource compiler
77 RCFLAGS := # Mark as Win32 compatible resources
78 LIB := lib # Librarian
80 ILIB := lib # Import librarian
81 ILIBFLAGS := /MACHINE:IX86
83 NMSYM := $(SOFTICE_PATH)\nmsym.exe
85 NMSYMFLAGS := /TRANSLATE:source,package,always /PROMPT /SOURCE:$(MSVCDIR)\crt\src\intel;$(SCITECH)\src\pm;$(SCITECH)\src\pm\common;$(SCITECH)\src\pm\ntdrv
87 NMSYMFLAGS := /TRANSLATE:source,package,always /PROMPT /SOURCE:$(SCITECH)\src\pm;$(SCITECH)\src\pm\common;$(SCITECH)\src\pm\win32
90 # Set the compiler warning level
97 # Optionally turn on debugging information
99 CFLAGS += /Yd /Zi # Turn on debugging for C compiler
101 ASFLAGS += /zi # Turn on debugging for assembler
105 ASFLAGS += /q # Suppress object records not needed for linking
109 # Optionally turn on optimisations
110 .IF $(VC_LIBBASE) == vc5
112 CFLAGS += /G6 /O2 /Ox /Oi-
118 CFLAGS += /G5 /O2 /Ox
124 # Optionally turn on direct i387 FPU instructions
131 # Optionally compile a beta release version of a product
137 # Use a larger stack during linking if requested, or use a default stack
138 # of 50k. The usual default stack provided by Visual C++ is *way* to small
139 # for real 32 bit code development.
142 # Not necessary for Win32 code.
145 LDENDFLAGS += /STACK:$(STKSIZE)
147 LDENDFLAGS += /STACK:51200
151 # DOS extender dependant flags
152 .IF $(USE_NTDRV) # Build 32 bit Windows NT driver
153 CFLAGS += /LD /Zl /Gy /Gz /GF /D__NT_DRIVER__ /D_X86_=1 /Di386=1
158 DEF_LIBS := int64.lib ntoskrnl.lib hal.lib
159 DX_ASFLAGS += -d__NT_DRIVER__
160 .IF $(USE_W2KDRV) # Build 32 bit Windows 2000 driver
165 .ELIF $(USE_WIN32) # Build 32 bit Windows NT app
168 CFLAGS += -D__CONSOLE__
171 CFLAGS += /MT /LD /DBUILD_DLL
172 ASFLAGS += -dBUILD_DLL
174 LDENDFLAGS += /NODEFAULTLIB
178 DEF_LIBS := 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 odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib
182 DEF_LIBS := 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 odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib
184 DX_ASFLAGS += -d__WINDOWS32__
186 .ELIF $(USE_RTTARGET)
187 CFLAGS += -D__RTTARGET__
189 DX_ASFLAGS += -d__RTTARGET__
192 DEF_LIBS := cw32mt.lib
196 CFLAGS += /MT /D__MSDOS32__
200 DEF_LIBS := dosx32.lib tntapi.lib
203 # Define the base directory for library files
206 LIB_BASE_DIR := $(SCITECH_LIB)\lib\debug
207 CFLAGS += /DCHECKED=1
209 LIB_BASE_DIR := $(SCITECH_LIB)\lib\release
212 # Define where to install library files
213 LIB_BASE := $(LIB_BASE_DIR)\$(LIB_OS)\$(VC_LIBBASE)
214 LIB_DEST := $(LIB_BASE)
216 # Place to look for PMODE library files
219 PMLIB := $(LIB_BASE:s/\/\\)\\tnt\\pm.lib
221 PMLIB := $(LIB_BASE:s/\/\\)\\pm.lib
224 # Define which file contains our rules