source: trunk/third/firefox/config/WIN32 @ 21695

Revision 21695, 5.8 KB checked in by rbasch, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21694, which included commits to RCS files with non-trunk default branches.
Line 
1# The contents of this file are subject to the Netscape Public
2# License Version 1.1 (the "License"); you may not use this file
3# except in compliance with the License. You may obtain a copy of
4# the License at http://www.mozilla.org/NPL/
5#
6# Software distributed under the License is distributed on an "AS
7# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
8# implied. See the License for the specific language governing
9# rights and limitations under the License.
10#
11# The Original Code is mozilla.org code.
12#
13# The Initial Developer of the Original Code is Netscape
14# Communications Corporation.  Portions created by Netscape are
15# Copyright (C) 1998 Netscape Communications Corporation. All
16# Rights Reserved.
17#
18# Contributor(s):
19
20#//------------------------------------------------------------------------
21#//
22#// Win32 Configuration file
23#//
24#//------------------------------------------------------------------------
25
26#//------------------------------------------------------------------------
27#//
28#// Define the OS dependent commands used by MAKE
29#//
30#//------------------------------------------------------------------------
31CC=cl
32LD=link
33AR=lib
34RC=rc
35#RM=del /F /Q
36#RM_R=del /F /S /Q
37RM=rm -f
38RM_R=rm -fr
39CP=cp
40AWK=$(MOZ_TOOLS)\bin\gawk.exe
41RANLIB=$(DEPTH)\config\true.bat
42JAVAH=$(DIST)\bin\javah.exe
43JAVA=$(MOZ_TOOLS)\bin\java.exe
44
45!ifndef JAVAH_IN_JAVA
46JAVAH_PROG = $(DIST)\bin\javah.exe
47!else
48JAVAH_PROG = $(JAVA) netscape.tools.jric.Main
49!endif
50
51#//------------------------------------------------------------------------
52#//
53#// Define Debug and optimization flags
54#//
55#//------------------------------------------------------------------------
56
57!ifdef MOZ_DEBUG
58#
59# Uncomment for MSVC debug malloc logging...
60#
61#OPTIMIZER=-Zi -DDEBUG -UNDEBUG -D_DEBUG -D_CRTDBG_MAP_ALLOC
62OPTIMIZER=-Zi -DDEBUG -UNDEBUG -D_DEBUG
63!if defined(GLOWCODE) && "$(MOZ_BITS)"=="32"
64OS_LFLAGS=/DEBUG /DEBUGTYPE:BOTH /INCLUDE:_GlowCode /PDB:NONE
65!else
66OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:$(PDBFILE)
67!endif
68
69!else
70
71# Initialize to non-profile, non-coverage optimization
72OPTIMIZER=-O1 -UDEBUG -DNDEBUG
73OS_LFLAGS=/OPT:nowin98
74
75
76# if MOZ_DEBUG is not set and MOZ_PROFILE is set, then we generate
77# an optimized build with debugging symbols. Useful for debugging
78# compiler optimization bugs, as well as running with Quantify.
79
80!if defined (MOZ_PROFILE)
81OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:NONE /OPT:REF /OPT:nowin98
82OPTIMIZER=-Zi -O1 -UDEBUG -DNDEBUG
83!endif
84# MOZ_PROFILE
85
86# if MOZ_COVERAGE is set, we handle pdb files slightly differently
87!if defined(MOZ_COVERAGE)
88OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:$(PDBFILE) /OPT:REF /OPT:nowin98
89OPTIMIZER=-Zi -O1 -UDEBUG -DNDEBUG
90!endif
91# MOZ_COVERAGE
92
93#
94# Handle trace-malloc in optimized builds.
95# No opt to give sane callstacks.
96#
97!if defined(MOZ_TRACE_MALLOC)
98OPTIMIZER=-Zi -Od -UDEBUG -DNDEBUG
99OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:NONE /OPT:REF /OPT:nowin98
100!endif
101# MOZ_TRACE_MALLOC
102
103# if MOZ_DEBUG is not set and MOZ_MAPINFO
104!if defined (MOZ_MAPINFO)
105OS_LFLAGS=$(OS_LFLAGS) /MAP:$(MAPFILE) /MAPINFO:LINES
106!endif
107#MOZ_MAPINFO
108
109!endif
110# MOZ_DEBUG
111
112#//------------------------------------------------------------------------
113#//
114#// Select the correct RTL to link...
115#//
116#// Currently, unless USE_STATIC_LIBS is defined, the multithreaded
117#// DLL version of the RTL is used...
118#//
119#//------------------------------------------------------------------------
120!ifdef USE_STATIC_LIBS
121RTL_FLAGS=-MT          # Statically linked multithreaded RTL
122!if defined(MOZ_DEBUG) || defined(MOZ_TRACE_MALLOC)
123RTL_FLAGS=-MTd         # Statically linked multithreaded MSVC4.0 debug RTL
124!endif
125
126!else ifdef USE_NON_MT_LIBS
127RTL_FLAGS=-ML          # Statically linked non-multithreaded LIBC RTL
128!if defined(MOZ_DEBUG) || defined(MOZ_TRACE_MALLOC)
129RTL_FLAGS=-MLd         # Statically linked non-multithreaded LIBC debug RTL
130!endif
131
132!else
133RTL_FLAGS=-MD          # Dynamically linked, multithreaded RTL
134
135!if defined(MOZ_DEBUG) || defined(MOZ_TRACE_MALLOC)
136!ifndef MOZ_NO_DEBUG_RTL
137RTL_FLAGS=-MDd         # Dynamically linked, multithreaded MSVC4.0 debug RTL
138!endif
139!endif
140!endif
141
142#//------------------------------------------------------------------------
143#//
144#// Specify the OS dependent compiler flags, linker flags and libraries
145#//
146#//------------------------------------------------------------------------
147OS_CFLAGS=$(OPTIMIZER) $(RTL_FLAGS) -W3 -nologo -D_X86_ -D_WINDOWS  -DWIN32 \
148            -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS -DWINVER=0x400 -Gy
149
150OS_CFLAGS=$(OS_CFLAGS) -DMSVC4
151
152!ifdef MOZ_DEBUG
153# Enable browse info in VC++
154!ifdef MOZ_BROWSE_INFO
155OS_CFLAGS=$(OS_CFLAGS) /FR
156!endif
157!endif
158
159## Removed MOZ_LITE/MOZ_MEDIUM stuff from OS_CFLAGS
160
161OS_LFLAGS=$(OS_LFLAGS)
162OS_LIBS=kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib
163
164#//------------------------------------------------------------------------
165#//
166#// Specify the special flags for creating EXEs
167#//
168#//------------------------------------------------------------------------
169!if defined(SWAPTUNER) || (defined(GLOWCODE) && defined(GLOWPROF) && "$(MOZ_BITS)"=="32")
170# this seems to get lost
171EXE_CFLAGS=/Gh
172!else
173EXE_CFLAGS=/Gy
174!endif
175!if defined(MOZ_PROFILE)
176EXE_LFLAGS=/FIXED:NO
177!else
178EXE_LFLAGS=
179!endif
180EXE_LIBS=
181
182!if defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE)
183EXE_LIBS=$(EXE_LIBS) $(DIST)/lib/trace.lib
184!endif
185
186#//------------------------------------------------------------------------
187#//
188#// Specify the special flags for creating DLLs
189#//
190#//------------------------------------------------------------------------
191DLL_CFLAGS=
192DLL_LFLAGS=/SUBSYSTEM:WINDOWS
193DLL_LIBS=
194
195!if defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE)
196DLL_LIBS=$(DLL_LIBS) $(DIST)/lib/trace.lib
197!endif
198 
199#//------------------------------------------------------------------------
200#//
201#// rebase setting, msvc systems better have this
202#//
203#//------------------------------------------------------------------------
204
205REBASE=rebase.exe
206
Note: See TracBrowser for help on using the repository browser.