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 | #//------------------------------------------------------------------------ |
---|
31 | CC=cl |
---|
32 | LD=link |
---|
33 | AR=lib |
---|
34 | RC=rc |
---|
35 | #RM=del /F /Q |
---|
36 | #RM_R=del /F /S /Q |
---|
37 | RM=rm -f |
---|
38 | RM_R=rm -fr |
---|
39 | CP=cp |
---|
40 | AWK=$(MOZ_TOOLS)\bin\gawk.exe |
---|
41 | RANLIB=$(DEPTH)\config\true.bat |
---|
42 | JAVAH=$(DIST)\bin\javah.exe |
---|
43 | JAVA=$(MOZ_TOOLS)\bin\java.exe |
---|
44 | |
---|
45 | !ifndef JAVAH_IN_JAVA |
---|
46 | JAVAH_PROG = $(DIST)\bin\javah.exe |
---|
47 | !else |
---|
48 | JAVAH_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 |
---|
62 | OPTIMIZER=-Zi -DDEBUG -UNDEBUG -D_DEBUG |
---|
63 | !if defined(GLOWCODE) && "$(MOZ_BITS)"=="32" |
---|
64 | OS_LFLAGS=/DEBUG /DEBUGTYPE:BOTH /INCLUDE:_GlowCode /PDB:NONE |
---|
65 | !else |
---|
66 | OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:$(PDBFILE) |
---|
67 | !endif |
---|
68 | |
---|
69 | !else |
---|
70 | |
---|
71 | # Initialize to non-profile, non-coverage optimization |
---|
72 | OPTIMIZER=-O1 -UDEBUG -DNDEBUG |
---|
73 | OS_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) |
---|
81 | OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:NONE /OPT:REF /OPT:nowin98 |
---|
82 | OPTIMIZER=-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) |
---|
88 | OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:$(PDBFILE) /OPT:REF /OPT:nowin98 |
---|
89 | OPTIMIZER=-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) |
---|
98 | OPTIMIZER=-Zi -Od -UDEBUG -DNDEBUG |
---|
99 | OS_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) |
---|
105 | OS_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 |
---|
121 | RTL_FLAGS=-MT # Statically linked multithreaded RTL |
---|
122 | !if defined(MOZ_DEBUG) || defined(MOZ_TRACE_MALLOC) |
---|
123 | RTL_FLAGS=-MTd # Statically linked multithreaded MSVC4.0 debug RTL |
---|
124 | !endif |
---|
125 | |
---|
126 | !else ifdef USE_NON_MT_LIBS |
---|
127 | RTL_FLAGS=-ML # Statically linked non-multithreaded LIBC RTL |
---|
128 | !if defined(MOZ_DEBUG) || defined(MOZ_TRACE_MALLOC) |
---|
129 | RTL_FLAGS=-MLd # Statically linked non-multithreaded LIBC debug RTL |
---|
130 | !endif |
---|
131 | |
---|
132 | !else |
---|
133 | RTL_FLAGS=-MD # Dynamically linked, multithreaded RTL |
---|
134 | |
---|
135 | !if defined(MOZ_DEBUG) || defined(MOZ_TRACE_MALLOC) |
---|
136 | !ifndef MOZ_NO_DEBUG_RTL |
---|
137 | RTL_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 | #//------------------------------------------------------------------------ |
---|
147 | OS_CFLAGS=$(OPTIMIZER) $(RTL_FLAGS) -W3 -nologo -D_X86_ -D_WINDOWS -DWIN32 \ |
---|
148 | -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS -DWINVER=0x400 -Gy |
---|
149 | |
---|
150 | OS_CFLAGS=$(OS_CFLAGS) -DMSVC4 |
---|
151 | |
---|
152 | !ifdef MOZ_DEBUG |
---|
153 | # Enable browse info in VC++ |
---|
154 | !ifdef MOZ_BROWSE_INFO |
---|
155 | OS_CFLAGS=$(OS_CFLAGS) /FR |
---|
156 | !endif |
---|
157 | !endif |
---|
158 | |
---|
159 | ## Removed MOZ_LITE/MOZ_MEDIUM stuff from OS_CFLAGS |
---|
160 | |
---|
161 | OS_LFLAGS=$(OS_LFLAGS) |
---|
162 | OS_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 |
---|
171 | EXE_CFLAGS=/Gh |
---|
172 | !else |
---|
173 | EXE_CFLAGS=/Gy |
---|
174 | !endif |
---|
175 | !if defined(MOZ_PROFILE) |
---|
176 | EXE_LFLAGS=/FIXED:NO |
---|
177 | !else |
---|
178 | EXE_LFLAGS= |
---|
179 | !endif |
---|
180 | EXE_LIBS= |
---|
181 | |
---|
182 | !if defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE) |
---|
183 | EXE_LIBS=$(EXE_LIBS) $(DIST)/lib/trace.lib |
---|
184 | !endif |
---|
185 | |
---|
186 | #//------------------------------------------------------------------------ |
---|
187 | #// |
---|
188 | #// Specify the special flags for creating DLLs |
---|
189 | #// |
---|
190 | #//------------------------------------------------------------------------ |
---|
191 | DLL_CFLAGS= |
---|
192 | DLL_LFLAGS=/SUBSYSTEM:WINDOWS |
---|
193 | DLL_LIBS= |
---|
194 | |
---|
195 | !if defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE) |
---|
196 | DLL_LIBS=$(DLL_LIBS) $(DIST)/lib/trace.lib |
---|
197 | !endif |
---|
198 | |
---|
199 | #//------------------------------------------------------------------------ |
---|
200 | #// |
---|
201 | #// rebase setting, msvc systems better have this |
---|
202 | #// |
---|
203 | #//------------------------------------------------------------------------ |
---|
204 | |
---|
205 | REBASE=rebase.exe |
---|
206 | |
---|