source: trunk/third/firefox/config/config.mak @ 21695

Revision 21695, 14.5 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!if !defined(CONFIG_CONFIG_MAK)
21CONFIG_CONFIG_MAK=1
22
23#//------------------------------------------------------------------------
24#//
25#// Define public make variables:
26#//
27#//    OBJDIR  - Specifies the location of intermediate files (ie. objs...)
28#//              Currently, the names are WINxx_O.OBJ or WINxx_D.OBJ for
29#//              optimized and debug builds respectively.
30#//
31#//    DIST    - Specifies the location of the distribution directory where
32#//              all targets are delivered.
33#//
34#//    CFGFILE - Specifies the name of the temporary configuration file
35#//              containing the arguments to the current command.
36#//
37#//    INCS    - Default include paths.
38#//
39#//    CFLAGS  - Default compiler options.
40#//
41#//    LFLAGS  - Default linker options.
42#//
43#//------------------------------------------------------------------------
44
45
46
47#//-----------------------------------------------------------------------
48#//
49#// Detect WinNT vs. Win9x and set WINOS appropriately.
50#//
51#// Set WINOS in your environment to avoid the timewasting uname call
52#//
53#//-----------------------------------------------------------------------
54!if !defined(WINOS)
55!if [$(MOZ_TOOLS)\bin\uname > osuname.inc]
56!endif
57WINOS=\
58!include "osuname.inc"
59WINOS=$(WINOS: =)^
60
61!if [del osuname.inc]
62!endif
63!endif
64
65
66
67#//-----------------------------------------------------------------------
68#//
69#// DIST DEFINITION
70#//
71#//-----------------------------------------------------------------------
72
73XPDIST=$(DEPTH)\dist
74!ifdef MODULE
75PUBLIC=$(XPDIST)\include\$(MODULE)
76!else
77PUBLIC=$(XPDIST)\include
78!endif
79
80!ifdef NGLAYOUT_BUILD_PREFIX
81DIST_PREFIX=NGL
82!else
83!ifdef MOZ_NAV_BUILD_PREFIX
84DIST_PREFIX=NAV
85!else
86DIST_PREFIX=WIN
87!endif
88!endif
89
90!ifndef MOZ_DEBUG
91OBJDIR=$(DIST_PREFIX)$(MOZ_BITS)$(OBJTYPE)_O.OBJ
92JAVA_OPTIMIZER = -O
93!ifdef NO_CAFE
94JAVAC_OPTIMIZER =
95!else
96#JAVAC_OPTIMIZER= -O -noinline
97JAVAC_OPTIMIZER =
98!endif
99!else
100OBJDIR=$(DIST_PREFIX)$(MOZ_BITS)$(OBJTYPE)_D.OBJ
101JAVA_OPTIMIZER = -g
102JAVAC_OPTIMIZER = -g
103!endif
104
105#//
106#// DIST DEFINES SHOULD NEVER BE COMPONENT SPECIFIC.
107#//
108!ifndef MOZ_DEBUG
109DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_O.OBJ
110!else
111DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_D.OBJ
112!endif
113
114# This will always give the location of NGLayout's dist, even if "NGLAYOUT_BUILD_PREFIX" is not defined.
115!if defined(MOZ_NGLAYOUT)
116!ifndef MOZ_DEBUG
117NGLAYOUT_DIST=$(XPDIST)\NGL$(MOZ_BITS)_O.OBJ
118!else
119NGLAYOUT_DIST=$(XPDIST)\NGL$(MOZ_BITS)_D.OBJ
120!endif
121!endif
122
123
124
125#//-----------------------------------------------------------------------
126#//
127#// Basic configuration settings
128#//
129#//-----------------------------------------------------------------------
130
131!ifndef DISABLE_LDAP
132LDAP_CFLAGS=-I$(XPDIST)\public\ldap
133!endif
134
135CFGFILE=$(OBJDIR)\cmd.cfg
136INCS=$(INCS) -I$(PUBLIC) -I$(DIST)\include -I$(XPDIST)\include\nspr
137
138
139!ifdef REQUIRES
140
141!if "$(WINOS)" == "WIN95"
142
143# use perl to translate REQUIRES into a proper include line
144# using \1 instead of $1 because nmake barfs on $1
145!if [echo $(REQUIRES) | perl -pe "s/(\S+)/-I$(XPDIST:\=\/)\\\include\\\\\1/g; print \"REQINCS=$_\";" > reqincs.inc]
146!endif
147 
148!else
149
150REQINCS1=REQINCS=-I $(XPDIST)/include/$(REQUIRES: = -I$(XPDIST^)/include/)
151
152!if [echo $(REQINCS1) > reqincs.inc]
153!endif
154
155!endif
156
157!include reqincs.inc
158
159!if [del reqincs.inc]
160!endif
161
162!endif
163
164INCS=$(INCS) -I$(XPDIST)\include $(REQINCS)
165
166!if "$(MOZ_BITS)" == "16"
167CFLAGS=$(MOZ_JAVA_FLAG) -DEDITOR $(OS_CFLAGS) $(MOZ_CFLAGS)
168!else
169CFLAGS=$(MOZ_JAVA_FLAG) $(OS_CFLAGS) $(MOZ_CFLAGS)
170!endif
171
172IBMBIDI=1
173CFLAGS=$(CFLAGS) -DIBMBIDI
174
175!if "$(DISABLE_ACCESSIBILITY)" == "1"
176!undef ACCESSIBILITY
177!else
178ACCESSIBILITY=1
179CFLAGS=$(CFLAGS) -DACCESSIBILITY
180!endif
181
182LFLAGS=$(OS_LFLAGS) $(LLFLAGS) $(MOZ_LFLAGS)
183
184# This compiles in heap dumping utilities and other good stuff
185# for developers -- maybe we only want it in for a special SDK
186# nspr/java runtime(?):
187!if "$(MOZ_BITS)"=="32" || defined(MOZ_DEBUG)
188CFLAGS = $(CFLAGS) -DDEVELOPER_DEBUG
189!endif
190
191!ifdef MOZ_BSCFILE
192CFLAGS = $(CFLAGS) -FR
193!endif
194
195!ifdef NO_LOGGING
196CFLAGS=$(CFLAGS) -DNS_DISABLE_LOGGING
197!else
198CFLAGS=$(CFLAGS) -DMOZ_LOGGING
199!endif
200
201FINAL_LINK_COMPS=$(DIST)\final-link-comps
202FINAL_LINK_COMP_NAMES=$(DIST)\final-link-comp-names
203FINAL_LINK_LIBS=$(DIST)\final-link-libs
204
205!ifdef MOZ_STATIC_COMPONENT_LIBS
206# Force _all_ exported methods to be |_declspec(dllexport)| when we're
207# building them into the executable.
208CFLAGS=$(CFLAGS) -D_IMPL_NS_APPSHELL
209CFLAGS=$(CFLAGS) -D_IMPL_NS_COOKIE
210CFLAGS=$(CFLAGS) -D_IMPL_NS_GFX
211CFLAGS=$(CFLAGS) -D_IMPL_NS_LAYOUT
212CFLAGS=$(CFLAGS) -D_IMPL_NS_MSG_BASE
213CFLAGS=$(CFLAGS) -D_IMPL_NS_PICS
214CFLAGS=$(CFLAGS) -D_IMPL_NS_PLUGIN
215CFLAGS=$(CFLAGS) -D_IMPL_NS_WIDGET
216!endif
217
218#//-----------------------------------------------------------------------
219#//
220#// feature-specific configuration settings
221#//
222#//-----------------------------------------------------------------------
223
224# Default configuration for debug builds
225!ifdef MOZ_DEBUG
226
227# turn on MOZ_TIMELINE
228!ifndef MOZ_TIMELINE_DISABLE
229MOZ_TIMELINE=1
230!endif
231
232# turn on TRACE_MALLOC
233!ifndef MOZ_TRACE_MALLOC_DISABLE
234MOZ_TRACE_MALLOC=1
235!endif
236
237!endif
238
239# Defines for cookie management feature...
240CFLAGS=$(CFLAGS) -DCookieManagement
241
242# Defines for single signon and client wallet features...
243!ifndef MOZ_NO_WALLET_HACK
244CFLAGS=$(CFLAGS) -DSingleSignon -DClientWallet
245!endif
246
247# TODO Cleanup later -Gagan
248!ifdef NU_CACHE
249CFLAGS=$(CFLAGS) -DNU_CACHE
250!endif
251
252# always need these:
253CFLAGS = $(CFLAGS) -DNETSCAPE
254
255# Specify that we are building a client.
256# This will instruct the cross platform libraries to
257# include all the client specific cruft.
258!if defined(SERVER_BUILD)
259CFLAGS = $(CFLAGS) -DSERVER_BUILD
260!elseif defined(LIVEWIRE)
261CFLAGS = $(CFLAGS) -DLIVEWIRE
262!else
263CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT
264!endif
265
266# need this everywhere jsapi.h might be included
267CFLAGS=$(CFLAGS) -DJS_THREADSAFE
268
269!if "$(STAND_ALONE_JAVA)" == "1"
270CFLAGS=$(CFLAGS) -DSTAND_ALONE_JAVA
271!endif
272
273NECKO=1
274CFLAGS=$(CFLAGS) -DNECKO
275
276
277!if defined(XPCONNECT_STANDALONE)
278CFLAGS=$(CFLAGS) -DXPCONNECT_STANDALONE
279!endif
280
281# Enable output of performance metrics if MOZ_PERF is set
282!ifdef MOZ_PERF
283CFLAGS=$(CFLAGS) -DMOZ_PERF_METRICS
284!endif
285
286# Enable the building of certain toolkit calls that require the newer SDK
287!ifdef MOZ_REQUIRE_CURRENT_SDK
288CFLAGS=$(CFLAGS) -DMOZ_REQUIRE_CURRENT_SDK
289!endif
290
291# Enable timeline service if MOZ_TIMELINE is set
292!ifdef MOZ_TIMELINE
293CFLAGS=$(CFLAGS) -DMOZ_TIMELINE
294!endif
295
296!ifndef MOZ_JAVA
297MOZ_OJI = 1             # on by default now
298!endif
299
300!ifdef MOZ_LIBTEST
301MOZ_LIBTEST = 1
302CFLAGS=$(CFLAGS) -DLAYPROBE_API
303!endif
304
305!ifdef MOZ_JAVA
306MOZ_JAVA_FLAG=-DJAVA
307!ifdef MOZ_OJI
308!error You can't define both MOZ_JAVA and MOZ_OJI anymore.
309!endif
310JAVA_OR_OJI = 1
311JAVA_OR_NSJVM = 1
312!endif
313
314!ifdef NSJVM
315JAVA_OR_NSJVM = 1
316AWT_11 = 1              # always build awt 1.1 with nsjvm now
317!endif
318
319!ifdef MOZ_OJI
320CFLAGS=$(CFLAGS) -DOJI
321JAVA_OR_OJI=1
322!endif
323
324!ifdef SMART_MAIL
325CFLAGS=$(CFLAGS) -DSMART_MAIL
326!endif
327
328!ifdef MOZ_TRACE_XPCOM_REFCNT
329CFLAGS=$(CFLAGS) -DMOZ_TRACE_XPCOM_REFCNT
330!endif
331
332!ifdef MOZ_TRACE_MALLOC
333CFLAGS=$(CFLAGS) -DNS_TRACE_MALLOC
334!endif
335
336!ifdef MOZ_SMOOTH_PROGRESS
337CFLAGS=$(CFLAGS) -DSMOOTH_PROGRESS
338!endif
339
340!if defined(USE_STRING2)
341CFLAGS = $(CFLAGS) -DUSE_STRING2
342!endif
343
344#!ifdef MOZ_XUL
345MOZ_XUL=1
346CFLAGS=$(CFLAGS) -DMOZ_XUL
347#!endif
348
349!ifndef DISABLE_MATHML
350MOZ_MATHML=1
351CFLAGS=$(CFLAGS) -DMOZ_MATHML
352!endif
353
354!ifdef MOZ_SVG
355CFLAGS=$(CFLAGS) -DMOZ_SVG
356!endif
357
358!ifdef MOZ_DEBUG
359CFLAGS=$(CFLAGS) -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP
360!endif
361
362CFLAGS=$(CFLAGS) -DNS_PRINT_PREVIEW
363
364!ifdef MOZ_STATIC_COMPONENT_LIBS
365CFLAGS=$(CFLAGS) -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT -DMOZ_STATIC_COMPONENT_LIBS
366!endif
367
368CFLAGS=$(CFLAGS) -DCPP_THROW_NEW=throw()
369
370#//-----------------------------------------------------------------------
371#//
372#// build tools
373#//
374#//-----------------------------------------------------------------------
375
376NMAKE=nmake -nologo -$(MAKEFLAGS)
377
378# grab the perl from the user's path (probably need 5.005)
379PERL = perl.exe
380
381#if MOZILLA_OFFICIAL is set, then define splitsym
382!if defined (MOZILLA_OFFICIAL)
383SPLITSYM = $(MOZ_TOOLS)\bin\splitsym
384!endif
385
386# use find
387!ifndef FIND
388FIND = find.exe
389!endif
390
391MASM = $(MOZ_TOOLS)\bin\ml.exe
392
393!if "$(WINOS)" == "WIN95"
394MKDIR = $(DEPTH)\config\w95mkdir
395QUIET =
396!else
397MKDIR = mkdir
398QUIET=@
399!endif
400
401
402
403#//------------------------------------------------------------------------
404#//
405#// Include the OS dependent configuration information
406#//
407#//------------------------------------------------------------------------
408include <$(DEPTH)/config/WIN$(MOZ_BITS)>
409
410!ifdef MOZ_DEBUG
411!ifdef USERNAME
412CFLAGS = $(CFLAGS) -DDEBUG_$(USERNAME)
413!endif
414!endif
415
416!if (defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE)) || (defined(GLOWCODE) && defined(GLOWPROF) && "$(MOZ_BITS)"=="32")
417CFLAGS = $(CFLAGS) /Gh
418!endif
419
420
421#//------------------------------------------------------------------------
422#//
423#// Define the global make commands.
424#//
425#//    MAKE_INSTALL  - Copy a target to the distribution directory.
426#//
427#//    MAKE_OBJDIRS  - Create an object directory (if necessary).
428#//
429#//     MAKE_MANGLE   - Convert all long filenames into 8.3 names
430#//
431#//     MAKE_UNMANGLE - Restore all long filenames
432#//
433#//------------------------------------------------------------------------
434!if !defined(MOZ_SRC)
435#enable builds on any drive if defined.
436MOZ_SRC=y:
437!endif
438MAKE_INSTALL=$(QUIET)$(DEPTH)\config\makecopy.exe
439MAKE_MANGLE=$(DEPTH)\config\mangle.exe
440MAKE_UNMANGLE=if exist unmangle.bat call unmangle.bat
441
442!if defined(MOZ_PURIFY)
443# add #line directive to header files for purify
444MKCPYFLAGS= -i
445!endif
446
447
448#//------------------------------------------------------------------------
449#//
450#// Common Libraries
451#//
452#//------------------------------------------------------------------------
453NSPR_VERSION=4
454LIBNSPR=$(DIST)\lib\nspr$(NSPR_VERSION).lib $(DIST)\lib\plds$(NSPR_VERSION).lib $(DIST)\lib\plc$(NSPR_VERSION).lib
455LIBPLC=$(DIST)\lib\plc$(NSPR_VERSION).lib
456
457NSPRDIR = nsprpub
458CFLAGS = $(CFLAGS) -DNSPR20
459
460LIBJPEG=$(DIST)\lib\jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib
461
462
463
464#//------------------------------------------------------------------------
465#//
466#// Windows-Specific Java Stuff
467#//
468#// (Is this used anymore? Even if it is should it be in config.mak?)
469#//
470#//------------------------------------------------------------------------
471
472PATH_SEPARATOR = ;
473
474!ifndef JAVA_HOME
475JAVA_HOME=$(JDKHOME)
476!endif
477
478# where the bytecode will go
479!if "$(AWT_11)" == "1"
480JAVA_DESTPATH = $(MOZ_SRC)\mozilla\dist\classes11
481!else
482JAVA_DESTPATH = $(MOZ_SRC)\mozilla\dist\classes
483!endif
484
485# where the source are
486DEFAULT_JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc
487!ifndef JAVA_SOURCEPATH
488!if "$(AWT_11)" == "1"
489JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc11;$(DEFAULT_JAVA_SOURCEPATH)
490!else
491JAVA_SOURCEPATH = $(DEFAULT_JAVA_SOURCEPATH)
492!endif
493!endif
494
495JAVA_PROG=$(MOZ_TOOLS)\bin\java.exe
496#JAVA_PROG=$(DIST)\bin\java
497
498JAVAC_ZIP=$(JAVA_HOME)\lib\classes.zip
499
500ZIP_PROG = $(MOZ_TOOLS)\bin\zip
501UNZIP_PROG = $(MOZ_TOOLS)\bin\unzip
502ZIP_COMPR = 9
503ZIP_FLAGS = -$(ZIP_COMPR)r
504
505CFLAGS = $(CFLAGS) -DOS_HAS_DLL
506
507DLL_SUFFIX      = dll
508LIB_SUFFIX      = lib
509
510!if "$(STAND_ALONE_JAVA)" == "1"
511STAND_ALONE_JAVA_DLL_SUFFIX=s
512!else
513STAND_ALONE_JAVA_DLL_SUFFIX=
514!endif
515
516MOD_JRT=jrt$(MOZ_BITS)$(VERSION_NUMBER)
517MOD_MM =mm$(MOZ_BITS)$(VERSION_NUMBER)
518MOD_AWT=awt$(MOZ_BITS)$(VERSION_NUMBER)
519MOD_AWTS=awt$(MOZ_BITS)$(VERSION_NUMBER)$(STAND_ALONE_JAVA_DLL_SUFFIX)
520MOD_JIT=jit$(MOZ_BITS)$(VERSION_NUMBER)
521MOD_JSJ=jsj$(MOZ_BITS)$(VERSION_NUMBER)
522MOD_NET=net$(MOZ_BITS)$(VERSION_NUMBER)
523MOD_JBN=jbn$(MOZ_BITS)$(VERSION_NUMBER)
524MOD_NSC=nsc$(MOZ_BITS)$(VERSION_NUMBER)
525MOD_JPW=jpw$(MOZ_BITS)$(VERSION_NUMBER)
526MOD_JDB=jdb$(MOZ_BITS)$(VERSION_NUMBER)
527MOD_ZPW=zpw$(MOZ_BITS)$(VERSION_NUMBER)
528MOD_CON=con$(MOZ_BITS)$(VERSION_NUMBER)
529MOD_NPJ=npj$(MOZ_BITS)$(VERSION_NUMBER)
530
531JRTDLL=$(MOD_JRT).$(DLL_SUFFIX)
532MMDLL =$(MOD_MM).$(DLL_SUFFIX)
533AWTDLL=$(MOD_AWT).$(DLL_SUFFIX)
534AWTSDLL=$(MOD_AWT)$(STAND_ALONE_JAVA_DLL_SUFFIX).$(DLL_SUFFIX)
535JITDLL=$(MOD_JIT).$(DLL_SUFFIX)
536JSJDLL=$(MOD_JSJ).$(DLL_SUFFIX)
537NETDLL=$(MOD_NET).$(DLL_SUFFIX)
538JBNDLL=$(MOD_JBN).$(DLL_SUFFIX)
539NSCDLL=$(MOD_NSC).$(DLL_SUFFIX)
540JPWDLL=$(MOD_JPW).$(DLL_SUFFIX)
541JDBDLL=$(MOD_JDB).$(DLL_SUFFIX)
542ZPWDLL=$(MOD_ZPW).$(DLL_SUFFIX)
543CONDLL=$(MOD_CON).$(DLL_SUFFIX)
544NPJDLL=$(MOD_NPJ).$(DLL_SUFFIX)
545
546AWTLIB=$(DIST)\lib\$(MOD_AWT).$(LIB_SUFFIX)
547
548######################################################################
549
550include <$(DEPTH)/config/common.mk>
551
552JAVA_DEFINES =                     \
553        -DJAR_NAME=\"$(JAR_NAME)\" \
554        -DJRTDLL=\"$(JRTDLL)\"     \
555        -DMMDLL=\"$(MMDLL)\"       \
556        -DAWTDLL=\"$(AWTDLL)\"     \
557        -DAWTSDLL=\"$(AWTSDLL)\"   \
558        -DJSJDLL=\"$(JSJDLL)\"     \
559        -DJITDLL=\"$(JITDLL)\"     \
560        -DNETDLL=\"$(NETDLL)\"     \
561        -DJBNDLL=\"$(JBNDLL)\"     \
562        -DNSCDLL=\"$(NSCDLL)\"     \
563        -DJDBDLL=\"$(JDBDLL)\"     \
564        -DJPWDLL=\"$(JPWDLL)\"     \
565        -DZPWDLL=\"$(ZPWDLL)\"     \
566        -DCONDLL=\"$(CONDLL)\"
567!if "$(MOZ_BITS)" == "16"
568
569# Override JAVA_DEFINES to make command line short for win16.
570# Put any new defines into javadefs.h in ns/sun-java/include.
571# This is to shorten the command line in order not to break Win16.
572
573JAVA_DEFINES = -DJAR_NAME=\"$(JAR_NAME)\" -DMOZ_BITS=\"$(MOZ_BITS)\" -DVERSION_NUMBER=\"$(VERSION_NUMBER)\" -DDLL_SUFFIX=\".$(DLL_SUFFIX)\"   
574
575!endif
576
577!if "$(AWT_11)" == "1"
578JAVA_DEFINES = $(JAVA_DEFINES) -DAWT_11
579!else
580JAVA_DEFINES = $(JAVA_DEFINES) -DAWT_102
581!endif
582
583
584#JAVA_CLASSPATH = $(JAVA_CLASSPATH:/=\)
585JMCSRCDIR = $(JMCSRCDIR:/=\)
586JAVA_BOOT_CLASSPATH = $(JAVA_BOOT_CLASSPATH:/=\)
587
588
589########
590#   Get the cwd to prepend to all compiled source
591#       files.  Will allow debugger to automatically find sources
592#       instead of asking for the path info.
593#   Win16 will break if enabled, guess we continue to live in pain
594#       therein.
595########
596!if "$(MOZ_BITS)" == "32"
597CURDIR=$(MAKEDIR)^\
598!endif
599
600XPIDL_PROG=$(DIST)\bin\xpidl.exe
601XPTLINK_PROG=$(DIST)\bin\xpt_link.exe
602
603# XXX If you change this name, be _sure_ to update rules.mak;
604# specifically, the rules that compute XPIDL_HEADERS and
605# XPIDL_TYPELIBS. 'nmake' is too dumb to allow recursive macro
606# substitution.
607
608XPIDL_GEN_DIR=.\_xpidlgen
609
610#MOZ_DISABLE_JAR_PACKAGING=1     # temporary
611
612!endif # CONFIG_CONFIG_MAK
613
Note: See TracBrowser for help on using the repository browser.