1 # https://bugzilla.mozilla.org/show_bug.cgi?id=104541#c2
4 # ***** BEGIN LICENSE BLOCK *****
5 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 # The contents of this file are subject to the Mozilla Public License Version
8 # 1.1 (the "License"); you may not use this file except in compliance with
9 # the License. You may obtain a copy of the License at
10 # http://www.mozilla.org/MPL/
12 # Software distributed under the License is distributed on an "AS IS" basis,
13 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 # for the specific language governing rights and limitations under the
17 # The Original Code is the Netscape security libraries.
19 # The Initial Developer of the Original Code is
20 # Netscape Communications Corporation.
21 # Portions created by the Initial Developer are Copyright (C) 1994-2000
22 # the Initial Developer. All Rights Reserved.
26 # Alternatively, the contents of this file may be used under the terms of
27 # either the GNU General Public License Version 2 or later (the "GPL"), or
28 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
38 # ***** END LICENSE BLOCK *****
40 CC = i686-pc-mingw32-gcc
41 CCC = i686-pc-mingw32-g++
42 LINK = i686-pc-mingw32-ld
43 AR = i686-pc-mingw32-ar
45 RANLIB = i686-pc-mingw32-ranlib
47 RC = i686-pc-mingw32-windres -O coff --use-temp-file
48 LINK_DLL = $(CC) $(OS_DLLFLAGS) $(DLLFLAGS)
54 LDOPTS += -L$(SOURCE_LIB_DIR)
57 DEFINES += -UDEBUG -DNDEBUG
60 NSINSTALL_DIR = $(BUILD_TREE)/nss
61 NSINSTALL = $(BUILD_TREE)/nss/nsinstall
63 NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
64 NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
67 MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
68 MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
69 MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk
71 ####################################################################
73 # One can define the makefile variable NSDISTMODE to control
74 # how files are published to the 'dist' directory. If not
75 # defined, the default is "install using relative symbolic
76 # links". The two possible values are "copy", which copies files
77 # but preserves source mtime, and "absolute_symlink", which
78 # installs using absolute symbolic links.
79 # - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97
80 # - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY
81 ####################################################################
83 ifeq ($(NSDISTMODE),copy)
84 # copy files, but preserve source mtime
85 INSTALL = $(NSINSTALL)
88 ifeq ($(NSDISTMODE),absolute_symlink)
89 # install using absolute symbolic links
90 INSTALL = $(NSINSTALL)
93 # install using relative symbolic links
94 INSTALL = $(NSINSTALL)
100 if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
104 # Not for Windows yet.
107 ifeq ($(USE_PTHREADS),1)
111 DEFAULT_COMPILER = i686-pc-mingw32-gcc
115 MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
117 MKSHLIB += -Wl,--version-script,$(MAPFILE)
119 PROCESS_MAP_FILE = grep -v ';-' $< | \
120 sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
123 ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
130 ifeq ($(USE_PTHREADS),1)
131 OS_PTHREAD = -lpthread
134 OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Wno-switch -pipe -mms-bitfields -D_WINDOWS
135 OS_LIBS = $(OS_PTHREAD)
138 DEFINES += -D_REENTRANT
144 DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,-z,defs
146 LDFLAGS += $(ARCHFLAG)
148 # INCLUDES += -I/usr/include -Y/usr/include/linux
149 G++INCLUDES = -I/usr/i686-pc-mingw32/sys-root/mingw/include/g++
152 # Always set CPU_TAG on Linux, OpenVMS, WINCE.
154 CPU_TAG = _$(CPU_ARCH)