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 *****
38 MOZ_WIDGET_TOOLKIT
= os2
40 # Specify toolset. Default to EMX.
41 ifeq ($(MOZ_OS2_TOOLS
),VACPP
)
44 ifeq ($(MOZ_OS2_TOOLS
),PGCC
)
52 # XP_PC is for Window and OS2 on Intel X86
53 # XP_OS2 is strictly for OS2 only
54 XP_DEFINE
+= -DXP_PC
=1 -DXP_OS2
=1
59 # Override suffix in suffix.mk
61 # the DLL_SUFFIX must be uppercase for FIPS mode to work. bugzilla 240784
71 # Keep AR_FLAGS blank so that we do not have to change rules.mk
73 RANLIB
= @echo OS2 RANLIB
74 BSDECHO
= @echo OS2 BSDECHO
78 # GCC for OS/2 currently predefines these, but we don't want them
79 DEFINES
+= -Uunix
-U__unix
-U__unix__
81 DEFINES
+= -DXP_OS2_EMX
-DTCPV40HDRS
83 ifeq ($(MOZ_OS2_HIGH_MEMORY
),1)
84 HIGHMEM_LDFLAG
= -Zhigh-mem
92 MKSHLIB
= $(CXX
) $(CXXFLAGS
) $(DSO_LDOPTS
) -o
$@
93 MKCSHLIB
= $(CC
) $(CFLAGS
) $(DSO_LDOPTS
) -o
$@
96 DSO_LDOPTS
= -Zomf
-Zdll
-Zmap
$(HIGHMEM_LDFLAG
)
100 MKSHLIB
+= $(MAPFILE
)
103 echo LIBRARY
$(LIBRARY_NAME
)$(LIBRARY_VERSION
) INITINSTANCE TERMINSTANCE
> $@
; \
104 echo PROTMODE
>> $@
; \
105 echo CODE LOADONCALL MOVEABLE DISCARDABLE
>> $@
; \
106 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED
>> $@
; \
107 echo EXPORTS
>> $@
; \
108 grep
-v
';+' $< | grep
-v
';-' | \
109 sed
-e
's; DATA ;;' -e
's,;;,,' -e
's,;.*,,' -e
's,\([\t ]*\),\1_,' | \
110 awk
'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}' >> $@
114 OS_CFLAGS
= -Wall
-W
-Wno-unused
-Wpointer-arith
-Wcast-align
-Zomf
-DDEBUG
-DTRACING
-g
118 DEFINES
+= -UDEBUG
-U_DEBUG
-DNDEBUG
119 DLLFLAGS
= -DLL
-OUT
:$@
-MAP
:$(@
:.dll
=.map
) $(HIGHMEM_LDFLAG
)
120 EXEFLAGS
= -PMTYPE
:VIO
-OUT
:$@
-MAP
:$(@
:.exe
=.map
) -nologo
-NOE
$(HIGHMEM_LDFLAG
)
124 DEFINES
+= -DDEBUG
-D_DEBUG
-DDEBUGPRINTS
#HCT Need += to avoid overidding manifest.mn
125 DLLFLAGS
= -DEBUG
-DLL
-OUT
:$@
-MAP
:$(@
:.dll
=.map
) $(HIGHMEM_LDFLAG
)
126 EXEFLAGS
= -DEBUG
-PMTYPE
:VIO
-OUT
:$@
-MAP
:$(@
:.exe
=.map
) -nologo
-NOE
$(HIGHMEM_LDFLAG
)
128 LDFLAGS
= -DEBUG
$(HIGHMEM_LDFLAG
)
133 # Override suffix in suffix.mk
143 CCC
= icc
-q
-DXP_OS2
-DOS2
=4 -N10
145 AR
= -ilib
/NOL
/NOI
/O
:$(subst /,\\,$@
)
146 # Keep AR_FLAGS blank so that we do not have to change rules.mk
148 RANLIB
= @echo OS2 RANLIB
149 BSDECHO
= @echo OS2 BSDECHO
150 IMPLIB
= implib
/NOL
/NOI
151 FILTER
= cppfilt
-b
-p
-q
158 MKSHLIB
= $(LD
) $(DSO_LDOPTS
)
159 MKCSHLIB
= $(LD
) $(DSO_LDOPTS
)
161 MKSHLIB_UNFORCE_ALL
=
167 MKSHLIB
+= $(MAPFILE
)
170 echo LIBRARY
$(LIBRARY_NAME
)$(LIBRARY_VERSION
) INITINSTANCE TERMINSTANCE
> $@
; \
171 echo PROTMODE
>> $@
; \
172 echo CODE LOADONCALL MOVEABLE DISCARDABLE
>> $@
; \
173 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED
>> $@
; \
174 echo EXPORTS
>> $@
; \
175 grep
-v
';+' $< | grep
-v
';-' | \
176 sed
-e
's; DATA ;;' -e
's,;;,,' -e
's,;.*,,' >> $@
179 OS_CFLAGS
= /Q
/qlibansi
/Gd
/Gm
/Su4
/Mp
/Tl-
180 INCLUDES
+= -I
$(CORE_DEPTH
)/..
/dist/include
181 DEFINES
+= -DXP_OS2_VACPP
-DTCPV40HDRS
183 DLLFLAGS
= /DLL
/O
:$@
/INC
:_dllentry
/MAP
:$(@
:.dll
=.map
)
184 EXEFLAGS
= -PMTYPE
:VIO
-OUT
:$@
-MAP
:$(@
:.exe
=.map
) -nologo
-NOE
185 LDFLAGS
= /FREE
/NOE
/LINENUMBERS
/nologo
188 OPTIMIZER
= /O
+ /Gl
+ /G5
/qarch
=pentium
189 DEFINES
+= -UDEBUG
-U_DEBUG
-DNDEBUG
191 LDFLAGS
+= /NODEBUG
/OPTFUNC
/EXEPACK
:2 /PACKCODE
/PACKDATA
194 DEFINES
+= -DDEBUG
-D_DEBUG
-DDEBUGPRINTS
#HCT Need += to avoid overidding manifest.mn
203 # OS/2 use nsinstall that is included in the toolkit.
204 # since we do not wish to support and maintain 3 version of nsinstall in mozilla, nspr and nss
207 NSINSTALL_DIR
= $(BUILD_TREE
)/nss
209 NSINSTALL_DIR
= $(CORE_DEPTH
)/coreconf
/nsinstall
211 # NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
212 NSINSTALL
= nsinstall
# HCT4OS2
213 INSTALL
= $(NSINSTALL
)
215 MKDEPEND_DIR
= $(CORE_DEPTH
)/coreconf
/mkdepend
216 MKDEPEND
= $(MKDEPEND_DIR
)/$(OBJDIR_NAME
)/mkdepend
217 MKDEPENDENCIES
= $(OBJDIR_NAME
)/depend.mk
219 ####################################################################
221 # One can define the makefile variable NSDISTMODE to control
222 # how files are published to the 'dist' directory. If not
223 # defined, the default is "install using relative symbolic
224 # links". The two possible values are "copy", which copies files
225 # but preserves source mtime, and "absolute_symlink", which
226 # installs using absolute symbolic links.
227 # - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97
228 # - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY
229 ####################################################################
231 ifeq ($(NSDISTMODE
),copy
)
232 # copy files, but preserve source mtime
233 INSTALL
= $(NSINSTALL
)
236 ifeq ($(NSDISTMODE
),absolute_symlink
)
237 # install using absolute symbolic links
238 INSTALL
= $(NSINSTALL
)
241 # install using relative symbolic links
242 INSTALL
= $(NSINSTALL
)
248 if
test ! -d
$(@D
); then
rm -rf
$(@D
); $(NSINSTALL
) -D
$(@D
); fi
252 # override the definition of DLL_PREFIX in prefix.mk
260 # override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY
263 TARGETS
= $(LIBRARY
) $(SHARED_LIBRARY
) $(IMPORT_LIBRARY
) $(PROGRAM
)
268 IMPORT_LIBRARY
= $(OBJDIR
)/$(LIBRARY_NAME
)$(LIBRARY_VERSION
)$(JDK_DEBUG_SUFFIX
).lib