2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
15 # The Original Code is the Netscape security libraries.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1994-2000
20 # the Initial Developer. All Rights Reserved.
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
39 # Configuration common to all versions of Windows NT
53 RC
= windres.exe
-O coff
--use-temp-file
54 LINK_DLL
= $(CC
) $(OS_DLLFLAGS
) $(DLLFLAGS
)
60 AR
+= -NOLOGO
-OUT
:"$@"
68 NSINSTALL_DIR
= $(BUILD_TREE
)/nss
70 NSINSTALL_DIR
= $(CORE_DEPTH
)/coreconf
/nsinstall
74 MKDEPEND_DIR
= $(CORE_DEPTH
)/coreconf
/mkdepend
75 MKDEPEND
= $(MKDEPEND_DIR
)/$(OBJDIR_NAME
)/mkdepend.exe
76 # Note: MKDEPENDENCIES __MUST__ be a relative pathname, not absolute.
77 # If it is absolute, gmake will crash unless the named file exists.
78 MKDEPENDENCIES
= $(OBJDIR_NAME
)/depend.mk
80 INSTALL
= $(NSINSTALL
)
82 MAKE_OBJDIR
+= $(OBJDIR
)
83 GARBAGE
+= $(OBJDIR
)/vc20.pdb
$(OBJDIR
)/vc40.pdb
93 # The -mnop-fun-dllimport flag allows us to avoid a drawback of
94 # the dllimport attribute that a pointer to a function marked as
95 # dllimport cannot be used as as a constant address.
96 OS_CFLAGS
+= -mno-cygwin
-mms-bitfields
-mnop-fun-dllimport
97 _GEN_IMPORT_LIB
=-Wl
,--out-implib
,$(IMPORT_LIBRARY
)
98 DLLFLAGS
+= -mno-cygwin
-o
$@
-shared
-Wl
,--export-all-symbols
$(if
$(IMPORT_LIBRARY
),$(_GEN_IMPORT_LIB
))
100 ifeq (11,$(ALLOW_OPT_CODE_SIZE
)$(OPT_CODE_SIZE
))
105 DEFINES
+= -UDEBUG
-U_DEBUG
-DNDEBUG
107 # Add symbolic information for a profiler
115 SPACE
:= $(NULLSTRING
) # end of the line
116 USERNAME
:= $(subst $(SPACE
),_
,$(USERNAME
))
117 USERNAME
:= $(subst -,_
,$(USERNAME
))
118 DEFINES
+= -DDEBUG
-D_DEBUG
-UNDEBUG
-DDEBUG_
$(USERNAME
)
123 ifeq (11,$(ALLOW_OPT_CODE_SIZE
)$(OPT_CODE_SIZE
))
128 DEFINES
+= -UDEBUG
-U_DEBUG
-DNDEBUG
129 DLLFLAGS
+= -OUT
:"$@"
131 # Add symbolic information for a profiler
136 ifdef MOZ_DEBUG_SYMBOLS
139 ifneq (,$(MOZ_PROFILE
)$(MOZ_DEBUG_SYMBOLS
))
140 DLLFLAGS
+= -DEBUG
-OPT
:REF
141 LDFLAGS
+= -DEBUG
-OPT
:REF
145 # Define USE_DEBUG_RTL if you want to use the debug runtime library
146 # (RTL) in the debug build
154 #OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od
156 SPACE
:= $(NULLSTRING
) # end of the line
157 USERNAME
:= $(subst $(SPACE
),_
,$(USERNAME
))
158 USERNAME
:= $(subst -,_
,$(USERNAME
))
159 DEFINES
+= -DDEBUG
-D_DEBUG
-UNDEBUG
-DDEBUG_
$(USERNAME
)
160 DLLFLAGS
+= -DEBUG
-OUT
:"$@"
162 ifndef MOZ_DEBUG_SYMBOLS
165 # Purify requires /FIXED:NO when linking EXEs.
178 DLLFLAGS
+= -DEF
:$(MAPFILE
)
181 # Change PROCESS to put the mapfile in the correct format for this platform
182 PROCESS_MAP_FILE
= cp
$< $@
186 # The following is NOT needed for the NSPR 2.0 library.
189 DEFINES
+= -D_WINDOWS
191 # override default, which is ASFLAGS = CFLAGS
194 ASFLAGS
= $(INCLUDES
)
197 ASFLAGS
= -Cp
-Sn
-Zi
-coff
$(INCLUDES
)
201 # override the definitions of RELEASE_TREE found in tree.mk
206 RELEASE_TREE
= $(NTBUILD_SHIP
)
208 RELEASE_TREE
= //redbuild
/components
211 RELEASE_TREE
= //redbuild
/components
216 # override the definitions of IMPORT_LIB_PREFIX, LIB_PREFIX, and
217 # DLL_PREFIX in prefix.mk
220 ifndef IMPORT_LIB_PREFIX
222 IMPORT_LIB_PREFIX
= lib
224 IMPORT_LIB_PREFIX
= $(NULL
)
241 # override the definitions of various _SUFFIX symbols in suffix.mk
256 # Assembler source suffixes
270 ifndef IMPORT_LIB_SUFFIX
271 IMPORT_LIB_SUFFIX
= .
$(LIB_SUFFIX
)
274 ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING
275 DYNAMIC_LIB_SUFFIX_FOR_LINKING
= $(IMPORT_LIB_SUFFIX
)
286 # When the processor is NOT 386-based on Windows NT, override the
287 # value of $(CPU_TAG). For WinNT, 95, 16, not CE.
289 ifneq ($(CPU_ARCH
),x386
)
290 CPU_TAG
= _
$(CPU_ARCH
)
294 # override ruleset.mk, removing the "lib" prefix for library names, and
295 # adding the "32" after the LIBRARY_VERSION.
298 SHARED_LIBRARY
= $(OBJDIR
)/$(LIBRARY_NAME
)$(LIBRARY_VERSION
)32$(JDK_DEBUG_SUFFIX
).dll
299 IMPORT_LIBRARY
= $(OBJDIR
)/$(LIBRARY_NAME
)$(LIBRARY_VERSION
)32$(JDK_DEBUG_SUFFIX
).lib
303 # override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY
306 TARGETS
= $(LIBRARY
) $(SHARED_LIBRARY
) $(IMPORT_LIBRARY
) $(PROGRAM
)