Import upstream u-boot 1.1.4
[u-boot.git] / board / MAI / bios_emulator / scitech / makedefs / vc32.mk
1 #############################################################################
2 #
3 #                                       SciTech Multi-platform Graphics Library
4 #
5 #  ========================================================================
6 #
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
11 #
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.
16 #
17 #    The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
18 #
19 #    The Initial Developer of the Original Code is SciTech Software, Inc.
20 #    All Rights Reserved.
21 #
22 #  ========================================================================
23 #
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.
28 #
29 #               Microsoft Visual C++ 2.x 32 bit version. Supports Phar Lap
30 #               TNT DOS Extender and 32 bit Windows development.
31 #
32 #############################################################################
33
34 # Include standard startup script definitions
35 .IMPORT: SCITECH
36 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
37
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
41
42 # We are compiling for a 32 bit envionment
43    _32BIT_      := 1
44
45 # Default commands for compiling, assembling linking and archiving
46    CC           := cl       # C-compiler and flags
47    CFLAGS       :=
48 .IF $(USE_NASM)
49    AS                   := nasm
50    ASFLAGS      := -t -f win32 -F null -d__FLAT__ -dSTDCALL_MANGLE -iINCLUDE -i$(SCITECH)\INCLUDE
51 .ELSE
52 .IF $(USE_TASM32)
53    AS           := tasm32
54 .ELIF $(USE_TASMX)
55    AS           := tasmx    # Assembler and flags
56 .ELSE
57    AS           := tasm     # Assembler and flags
58 .ENDIF
59    ASFLAGS      := /t /mx /m /D__FLAT__ /DSTDCALL_MANGLE /iINCLUDE /i$(SCITECH)\INCLUDE
60 .ENDIF
61    LD           := cl
62 .IF $(USE_WIN32)
63    LDFLAGS       = $(CFLAGS)
64 .IF $(USE_NTDRV)
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
67 .ELIF $(WIN32_GUI)
68    LDENDFLAGS   = -link /INCREMENTAL:NO /DEF:$(@:b).def /SUBSYSTEM:WINDOWS /MACHINE:I386 /DEBUGTYPE:CV /PDB:NONE
69 .ELSE
70    LDENDFLAGS   = -link /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MACHINE:I386 /DEBUGTYPE:CV /PDB:NONE
71 .ENDIF
72 .ELSE
73    LDFLAGS       = $(CFLAGS)
74    LDENDFLAGS   := -link -stub:$(TNT_PATH:s/\/\\)\\bin\\gotnt.exe /PDB:NONE
75 .ENDIF
76    RC           := rc       # Watcom resource compiler
77    RCFLAGS      :=          # Mark as Win32 compatible resources
78    LIB          := lib      # Librarian
79    LIBFLAGS     :=
80    ILIB         := lib      # Import librarian
81    ILIBFLAGS    := /MACHINE:IX86
82    INTEL_X86    := 1
83    NMSYM                := $(SOFTICE_PATH)\nmsym.exe
84 .IF $(USE_NTDRV)
85    NMSYMFLAGS   := /TRANSLATE:source,package,always /PROMPT /SOURCE:$(MSVCDIR)\crt\src\intel;$(SCITECH)\src\pm;$(SCITECH)\src\pm\common;$(SCITECH)\src\pm\ntdrv
86 .ELSE
87    NMSYMFLAGS   := /TRANSLATE:source,package,always /PROMPT /SOURCE:$(SCITECH)\src\pm;$(SCITECH)\src\pm\common;$(SCITECH)\src\pm\win32
88 .ENDIF
89
90 # Set the compiler warning level
91 .IF $(MAX_WARN)
92    CFLAGS       += -W3
93 .ELSE
94    CFLAGS       += -W1
95 .ENDIF
96
97 # Optionally turn on debugging information
98 .IF $(DBG)
99    CFLAGS       += /Yd /Zi  # Turn on debugging for C compiler
100 .IF $(USE_TASM)
101    ASFLAGS      += /zi      # Turn on debugging for assembler
102 .ENDIF
103 .ELSE
104 .IF $(USE_TASM)
105    ASFLAGS      += /q       # Suppress object records not needed for linking
106 .ENDIF
107 .END
108
109 # Optionally turn on optimisations
110 .IF $(VC_LIBBASE) == vc5
111 .IF $(OPT)
112    CFLAGS       += /G6 /O2 /Ox /Oi-
113 .ELIF $(OPT_SIZE)
114    CFLAGS       += /G6 /O1
115 .END
116 .ELSE
117 .IF $(OPT)
118    CFLAGS       += /G5 /O2 /Ox
119 .ELIF $(OPT_SIZE)
120    CFLAGS       += /G5 /O1
121 .END
122 .ENDIF
123
124 # Optionally turn on direct i387 FPU instructions
125
126 .IF $(FPU)
127    CFLAGS       += /DFPU387
128    ASFLAGS      += -dFPU387
129 .END
130
131 # Optionally compile a beta release version of a product
132 .IF $(BETA)
133    CFLAGS       += /DBETA
134    ASFLAGS      += -dBETA
135 .END
136
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.
140
141 .IF $(USE_WIN32)
142         # Not necessary for Win32 code.
143 .ELSE
144 .IF $(STKSIZE)
145         LDENDFLAGS  += /STACK:$(STKSIZE)
146 .ELSE
147         LDENDFLAGS  += /STACK:51200
148 .ENDIF
149 .ENDIF
150
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
154 .IF $(DBG)
155    CFLAGS       += /QIf
156 .ENDIF
157    ASFLAGS      +=
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
161    LIB_OS       = W2KDRV
162 .ELSE
163    LIB_OS       = NTDRV
164 .ENDIF
165 .ELIF $(USE_WIN32)              # Build 32 bit Windows NT app
166 .IF $(WIN32_GUI)
167 .ELSE
168     CFLAGS       += -D__CONSOLE__
169 .ENDIF
170 .IF $(BUILD_DLL)
171    CFLAGS       += /MT /LD /DBUILD_DLL
172    ASFLAGS      += -dBUILD_DLL
173 .IF $(NO_RUNTIME)
174    LDENDFLAGS   += /NODEFAULTLIB
175    CFLAGS               += /Zl
176    DEF_LIBS             :=
177 .ELSE
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
179 .ENDIF
180 .ELSE
181    CFLAGS       += /MT
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
183 .ENDIF
184    DX_ASFLAGS   += -d__WINDOWS32__
185    LIB_OS       = WIN32
186 .ELIF $(USE_RTTARGET)
187    CFLAGS       += -D__RTTARGET__
188    DX_CFLAGS    +=
189    DX_ASFLAGS   += -d__RTTARGET__
190    USE_REALDOS  :=
191    LIB_OS       = RTT32
192    DEF_LIBS     := cw32mt.lib
193 .ELSE
194    USE_TNT      := 1
195    USE_REALDOS  := 1
196    CFLAGS       += /MT /D__MSDOS32__
197    DX_CFLAGS    += -DTNT
198    DX_ASFLAGS   += -dTNT
199    LIB_OS       = DOS32
200    DEF_LIBS             := dosx32.lib tntapi.lib
201 .ENDIF
202
203 # Define the base directory for library files
204
205 .IF $(CHECKED)
206 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\debug
207 CFLAGS                  += /DCHECKED=1
208 .ELSE
209 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\release
210 .ENDIF
211
212 # Define where to install library files
213    LIB_BASE     := $(LIB_BASE_DIR)\$(LIB_OS)\$(VC_LIBBASE)
214    LIB_DEST     := $(LIB_BASE)
215
216 # Place to look for PMODE library files
217
218 .IF $(USE_TNT)
219 PMLIB           := $(LIB_BASE:s/\/\\)\\tnt\\pm.lib
220 .ELSE
221 PMLIB           := $(LIB_BASE:s/\/\\)\\pm.lib
222 .ENDIF
223
224 # Define which file contains our rules
225
226    RULES_MAK    := vc32.mk