source: trunk/third/firefox/Makefile.in @ 21695

Revision 21695, 10.1 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#
2# The contents of this file are subject to the Netscape Public
3# License Version 1.1 (the "License"); you may not use this file
4# except in compliance with the License. You may obtain a copy of
5# the License at http://www.mozilla.org/NPL/
6#
7# Software distributed under the License is distributed on an "AS
8# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9# implied. See the License for the specific language governing
10# rights and limitations under the License.
11#
12# The Original Code is mozilla.org code.
13#
14# The Initial Developer of the Original Code is Netscape
15# Communications Corporation.  Portions created by Netscape are
16# Copyright (C) 1998 Netscape Communications Corporation. All
17# Rights Reserved.
18#
19# Contributor(s):
20#
21
22DEPTH           = .
23topsrcdir       = @top_srcdir@
24srcdir          = @srcdir@
25VPATH           = @srcdir@
26
27include $(DEPTH)/config/autoconf.mk
28
29include $(topsrcdir)/build/unix/modules.mk
30
31ifeq ($(BUILD_MODULES),all)
32#
33# And now for something completely different...
34# Divide the default build into tiers.
35# Tiers must be defined on module boundaries
36#
37default: $(SUBMAKEFILES)
38        $(RM) -rf $(DIST)/sdk
39        $(MAKE) -C config export
40        $(MAKE) nspr
41        $(MAKE) ldap
42        $(MAKE) tier_0
43        $(MAKE) tier_1
44        $(MAKE) tier_2
45        $(MAKE) tier_9
46ifdef MOZ_PSM
47        $(MAKE) tier_40
48endif
49        $(MAKE) tier_50
50ifdef MOZ_JSDEBUGGER
51        $(MAKE) tier_93
52endif
53ifdef MOZ_EXTENSIONS
54        $(MAKE) tier_94
55endif
56ifdef MOZ_MAIL_NEWS
57        $(MAKE) tier_97
58endif
59ifdef MOZ_CALENDAR
60        $(MAKE) tier_98
61endif
62        $(MAKE) tier_99
63
64# Make sure that the existing rulesets work
65DIRS = \
66        $(tier_0_dirs) \
67        $(tier_1_dirs) \
68        $(tier_2_dirs) \
69        $(tier_9_dirs) \
70        $(tier_40_dirs) \
71        $(tier_50_dirs) \
72        $(NULL)
73
74ifdef GC_LEAK_DETECTOR
75DIRS += gc/boehm
76endif
77
78ifdef MOZ_JSDEBUGGER
79DIRS += $(tier_93_dirs)
80endif
81ifdef MOZ_EXTENSIONS
82DIRS += $(tier_94_dirs)
83endif
84ifdef MOZ_MAIL_NEWS
85DIRS += $(tier_97_dirs)
86endif
87ifdef MOZ_CALENDAR
88DIRS += $(tier_98_dirs)
89endif
90
91DIRS    += $(tier_99_dirs)
92
93#
94# tier 0 - base build config dirs
95#
96tier_0_dirs = \
97        config \
98        build \
99        $(NULL)
100
101#
102# tier 1 -  3rd party individual libraries
103#
104tier_1_dirs     += dbm
105
106ifndef MOZ_NATIVE_JPEG
107tier_1_dirs     += jpeg
108endif
109
110ifndef MOZ_NATIVE_ZLIB
111tier_1_dirs     += modules/zlib
112endif
113
114# Installer needs standalone libjar, hence standalone zlib
115ifdef MOZ_INSTALLER
116tier_1_dirs     += modules/zlib/standalone
117endif
118
119ifdef MOZ_INTERNAL_LIBART_LGPL
120tier_1_dirs     += other-licenses/libart_lgpl
121endif
122
123#
124# tier 2 - base libraries
125#
126tier_2_dirs     = \
127                js \
128                xpcom \
129                modules/libreg \
130                xpcom/obsolete \
131                $(NULL)
132
133ifdef NS_TRACE_MALLOC
134tier_2_dirs     += tools/trace-malloc/lib tools/trace-malloc
135endif
136
137#
138# tier 9 - core components (necko,gecko)
139#
140
141tier_9_dirs += \
142                js/src/xpconnect \
143                intl \
144                modules/libjar \
145                $(NULL)
146
147ifdef MOZ_OJI
148tier_9_dirs     += \
149                js/src/liveconnect \
150                modules/oji \
151                $(NULL)
152endif
153
154ifdef MOZ_ENABLE_XLIB
155tier_9_dirs     += gfx/src/xlibrgb widget/src/xlibxtbin
156endif
157
158ifdef MOZ_ENABLE_GTK
159tier_9_dirs     += widget/src/gtksuperwin widget/src/gtkxtbin
160endif
161
162ifdef MOZ_ENABLE_GTK2
163tier_9_dirs     += widget/src/gtkxtbin
164endif
165
166ifdef MOZ_IPCD
167tier_9_dirs += ipc/ipcd
168endif
169
170tier_9_dirs     += \
171                modules/libutil \
172                netwerk \
173                uriloader \
174                modules/libpref \
175                modules/libimg \
176                caps \
177                rdf \
178                expat \
179                htmlparser \
180                gfx \
181                modules/libpr0n \
182                sun-java \
183                modules/plugin \
184                dom \
185                view \
186                widget \
187                content \
188                layout \
189                db \
190                xpfe/components/shistory \
191                docshell \
192                webshell \
193                profile \
194                embedding \
195                editor \
196                $(NULL)
197
198ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
199tier_9_dirs     += xpfe/bootstrap/appleevents
200endif
201
202ifdef MOZ_THUNDERBIRD
203ifdef MOZ_USE_OFFICIAL_BRANDING
204tier_9_dirs  += other-licenses/branding/thunderbird
205endif
206endif
207
208ifdef MOZ_PHOENIX
209ifdef MOZ_USE_OFFICIAL_BRANDING
210tier_9_dirs  += other-licenses/branding/firefox
211endif
212endif
213
214tier_9_dirs     += \
215                xpfe/appshell \
216                xpfe/browser/public \
217                xpfe/components/sidebar/public \
218                xpfe/components/xremote/public \
219                $(NULL)
220
221ifdef MOZ_XUL
222ifdef MOZ_XUL_APP
223tier_9_dirs     += chrome
224else
225tier_9_dirs     += rdf/chrome
226endif
227endif
228
229ifdef ACCESSIBILITY
230tier_9_dirs    += accessible
231endif
232
233ifdef MOZ_LDAP_XPCOM
234tier_9_dirs     += directory/xpcom
235endif
236
237ifndef MOZ_XUL
238tier_9_dirs    += embedding/minimo/chromelite
239endif
240
241ifdef MOZ_ENABLE_GTK2
242tier_9_dirs    += toolkit/components/gnome
243endif
244
245#
246# tier 40 - security
247#
248ifdef MOZ_PSM
249tier_40_dirs    += security/manager
250endif
251
252#
253# tier 50 - xpfe & toolkit
254#
255
256# This must preceed xpfe
257ifdef MOZ_JPROF
258tier_50_dirs        += tools/jprof
259endif
260
261ifdef MOZ_XUL_APP
262tier_50_dirs += toolkit/components/history/public
263else
264tier_50_dirs += xpfe/components/history/public
265endif
266
267tier_50_dirs    += xpfe themes
268
269ifdef MOZ_LEAKY
270tier_50_dirs        += tools/leaky
271endif
272
273ifdef MOZ_MAPINFO
274tier_50_dirs    += tools/codesighs
275endif
276
277ifneq (,$(MOZ_L10N_LANG)$(MOZ_L10N_TOOLS))
278tier_50_dirs    += l10n
279endif
280
281ifdef MOZ_XUL_APP
282tier_50_dirs    += toolkit
283endif
284
285ifdef MOZ_PHOENIX
286#xpfe/components/search depends on nsIBookmarksService.idl
287#XXXBlake this shell path is a temp hack; toolkit shouldn't depend on browser
288tier_50_dirs    += browser/components/bookmarks/public browser/components/shell/public
289endif
290
291# toolkit/xre/ depends on xpinstall, so it must be in tier 50
292ifdef MOZ_XPINSTALL
293tier_50_dirs     +=  xpinstall
294endif
295
296#
297# tier 9x - application features
298#
299
300ifdef MOZ_JSDEBUGGER
301tier_93_dirs    += js/jsd
302endif
303
304ifdef MOZ_EXTENSIONS
305tier_94_dirs    += extensions
306endif
307
308ifdef MOZ_MAIL_NEWS
309tier_97_dirs    += mailnews
310endif
311
312ifdef MOZ_CALENDAR
313tier_98_dirs    += other-licenses/libical calendar
314endif
315
316#
317# tier 99 - application binaries
318#
319
320ifdef MOZ_COMPONENTLIB
321tier_99_dirs   += embedding/componentlib
322else
323ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
324tier_99_dirs   += modules/staticmod
325endif
326endif # MOZ_COMPONENTLIB
327
328ifdef MOZ_PHOENIX
329tier_99_dirs    += browser xpfe/bootstrap/init.d
330ifdef MOZ_USE_OFFICIAL_BRANDING
331tier_99_dirs += other-licenses/branding/firefox/content
332endif
333endif
334
335ifdef MOZ_THUNDERBIRD
336tier_99_dirs    += mail xpfe/bootstrap/init.d
337ifdef MOZ_USE_OFFICIAL_BRANDING
338tier_99_dirs += other-licenses/branding/thunderbird/content
339endif
340endif
341
342ifdef MOZ_STANDALONE_COMPOSER
343tier_99_dirs    += composer
344endif
345
346ifdef MOZ_XUL_APP
347ifdef MOZ_INSTALLER
348tier_99_dirs     +=  toolkit/mozapps/installer
349endif
350else
351ifneq (,$(MOZ_XPFE_COMPONENTS)$(MOZ_XUL))
352tier_99_dirs    += xpfe/bootstrap
353endif
354endif
355
356ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
357tier_99_dirs    += embedding/browser/gtk
358endif
359
360# viewer
361ifneq (,$(ENABLE_TESTS))
362tier_99_dirs += webshell/tests
363endif
364
365# winembed, mfcembed
366ifeq ($(OS_ARCH),WINNT)
367ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
368tier_99_dirs += embedding/tests
369endif
370endif
371
372# os2embed
373ifeq ($(OS_ARCH),OS2)
374ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
375tier_99_dirs += embedding/tests
376endif
377endif
378
379else
380
381# Standalone build
382
383DIRS            = $(BUILD_MODULE_DIRS)
384
385# Hack to generate xpidl Makefile
386ifneq ($(BUILD_MODULES),all)
387ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
388DIRS            := xpcom/typelib $(DIRS)
389SUBMAKEFILES    := xpcom/typelib/Makefile
390endif
391endif
392
393default: $(SUBMAKEFILES)
394        $(MAKE) export
395        $(MAKE) libs
396
397endif # BUILD_MODULES == all
398
399STATIC_MAKEFILES := nsprpub directory/c-sdk security/nss
400
401GARBAGE_DIRS += dist
402DIST_GARBAGE = config.cache config.log config.status config-defs.h \
403   dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
404   unallmakefiles mozilla-config.h \
405   $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
406
407# Build pseudo-external modules first when export is explicitly called
408export::
409        $(RM) -rf $(DIST)/sdk
410        $(MAKE) -C config export
411        $(MAKE) nspr
412        $(MAKE) ldap
413ifneq ($(BUILD_MODULES),all)
414ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
415        $(MAKE) -C xpcom/typelib
416        $(MAKE) export-idl
417endif
418endif
419
420install::
421ifndef MOZ_NATIVE_NSPR
422        $(MAKE) -C nsprpub real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
423        $(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
424        $(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
425endif
426ifdef MOZ_LDAP_XPCOM
427        $(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
428endif
429
430include $(topsrcdir)/config/rules.mk
431
432# Clean up after pseudo-external modules
433clean clobber realclean clobber_all distclean::
434ifndef MOZ_NATIVE_NSPR
435        $(MAKE) -C nsprpub $@
436endif
437ifdef MOZ_LDAP_XPCOM
438        $(MAKE) -C directory/c-sdk $@
439endif
440
441tier_%:
442        @echo "$@: $($@_dirs)"
443        @$(EXIT_ON_ERROR) \
444                for d in $($@_dirs); do $(UPDATE_TITLE) \
445                        $(MAKE) -C $$d export; \
446                done ; \
447                $(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
448                for d in $($@_dirs); do $(UPDATE_TITLE) \
449                        $(MAKE) -C $$d libs; \
450                done
451#
452# Individual modules
453#
454boehm:
455ifdef GC_LEAK_DETECTOR
456        $(MAKE) -C gc/boehm
457endif
458
459nspr: boehm
460ifndef MOZ_NATIVE_NSPR
461        $(MAKE) -C nsprpub
462endif
463
464ldap:
465ifdef MOZ_LDAP_XPCOM
466        $(MAKE) -C directory/c-sdk
467endif
468
469export::
470        @$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
471
472distclean::
473        cat unallmakefiles | $(XARGS) rm -f
474        rm -f unallmakefiles $(DIST_GARBAGE)
475
476ifeq ($(OS_ARCH),WINNT)
477rebase:
478ifdef MOZILLA_OFFICIAL
479        echo rebasing $(DIST)
480        /bin/find $(DIST) -name "*.dll" > rebase.lst
481        rebase -b 60000000 -R . -G rebase.lst
482        rm rebase.lst
483endif
484
485splitsymbols:
486ifdef MOZILLA_OFFICIAL
487ifdef MOZ_DEBUG_SYMBOLS
488        echo finding pdb files
489        mkdir -p $(DIST)/$(BUILDID)
490        -cp `/bin/find . -path "./dist" -prune -o -name "*.dll" | sed "s/\.dll$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
491        -cp `/bin/find . -path "./dist" -prune -o -name "*.exe" | sed "s/\.exe$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
492        -cp `/bin/find . -path "./dist" -prune -o -name "*.EXE" | sed "s/\.EXE$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
493endif # MOZ_DEBUG_SYMBOLS
494ifdef MOZ_PROFILE
495        echo splitting symbols out of binaries
496        /bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
497        /bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
498        /bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
499        mkdir -p $(DIST)/$(BUILDID)
500        /bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
501endif # MOZ_PROFILE
502endif # MOZILLA_OFFICIAL
503
504signnss:
505ifdef MOZILLA_OFFICIAL
506        echo signing NSS libs
507        cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
508endif # MOZILLA_OFFICIAL
509
510BUILDID = $(shell cat $(DEPTH)/config/build_number)
511deliver: splitsymbols rebase signnss
512
513endif # WINNT
514
Note: See TracBrowser for help on using the repository browser.