source: trunk/third/mozilla/Makefile.in @ 20014

Revision 20014, 8.7 KB checked in by rbasch, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20013, 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        $(MAKE) -C config export
39        $(MAKE) nspr
40        $(MAKE) ldap
41        $(MAKE) tier_0
42        $(MAKE) tier_1
43        $(MAKE) tier_2
44        $(MAKE) tier_9
45ifdef MOZ_PSM
46        $(MAKE) tier_40
47endif
48        $(MAKE) tier_50
49ifdef MOZ_JSDEBUGGER
50        $(MAKE) tier_93
51endif
52ifdef MOZ_EXTENSIONS
53        $(MAKE) tier_94
54endif
55ifdef MOZ_MAIL_NEWS
56        $(MAKE) tier_97
57endif
58ifdef MOZ_CALENDAR
59        $(MAKE) tier_98
60endif
61        $(MAKE) tier_99
62
63# Make sure that the existing rulesets work
64DIRS = \
65        $(tier_0_dirs) \
66        $(tier_1_dirs) \
67        $(tier_2_dirs) \
68        $(tier_9_dirs) \
69        $(tier_40_dirs) \
70        $(tier_50_dirs) \
71        $(NULL)
72
73ifdef GC_LEAK_DETECTOR
74DIRS += gc/boehm
75endif
76
77ifdef MOZ_JSDEBUGGER
78DIRS += $(tier_93_dirs)
79endif
80ifdef MOZ_EXTENSIONS
81DIRS += $(tier_94_dirs)
82endif
83ifdef MOZ_MAIL_NEWS
84DIRS += $(tier_97_dirs)
85endif
86ifdef MOZ_CALENDAR
87DIRS += $(tier_98_dirs)
88endif
89
90DIRS    += $(tier_99_dirs)
91
92#
93# tier 0 - base build config dirs
94#
95tier_0_dirs = \
96        config \
97        build \
98        $(NULL)
99
100#
101# tier 1 -  3rd party individual libraries
102#
103tier_1_dirs     += dbm
104
105ifndef MOZ_NATIVE_JPEG
106tier_1_dirs     += jpeg
107endif
108
109ifndef MOZ_NATIVE_ZLIB
110tier_1_dirs     += modules/zlib
111endif
112
113# Installer needs standalone libjar, hence standalone zlib
114ifdef MOZ_INSTALLER
115tier_1_dirs     += modules/zlib/standalone
116endif
117
118ifdef MOZ_INTERNAL_LIBART_LGPL
119tier_1_dirs     += other-licenses/libart_lgpl
120endif
121
122#
123# tier 2 - base libraries
124#
125tier_2_dirs     = js
126
127# MacOSX needs to build lib for MoreFiles before xpcom
128ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
129tier_2_dirs += lib/mac/MoreFiles
130endif
131
132tier_2_dirs     += \
133                xpcom \
134                modules/libreg \
135                xpcom/obsolete \
136                $(NULL)
137
138ifdef NS_TRACE_MALLOC
139tier_2_dirs     += tools/trace-malloc/lib tools/trace-malloc
140endif
141
142#
143# tier 9 - core components (necko,gecko)
144#
145
146tier_9_dirs += \
147                js/src/xpconnect \
148                intl \
149                modules/libjar \
150                $(NULL)
151
152ifdef MOZ_OJI
153tier_9_dirs     += \
154                js/src/liveconnect \
155                modules/oji \
156                $(NULL)
157endif
158
159ifdef MOZ_ENABLE_XLIB
160tier_9_dirs     += gfx/src/xlibrgb widget/src/xlibxtbin
161endif
162
163ifdef MOZ_ENABLE_GTK
164tier_9_dirs     += widget/src/gtksuperwin widget/src/gtkxtbin
165endif
166
167ifdef MOZ_ENABLE_GTK2
168tier_9_dirs     += widget/src/gtkxtbin
169endif
170
171ifdef MOZ_IPCD
172tier_9_dirs += ipc/ipcd
173endif
174
175tier_9_dirs     += \
176                modules/libutil \
177                netwerk \
178                uriloader \
179                modules/libpref \
180                modules/libimg \
181                caps \
182                rdf \
183                expat \
184                htmlparser \
185                gfx \
186                modules/libpr0n \
187                sun-java \
188                modules/plugin \
189                dom \
190                view \
191                widget \
192                content \
193                layout \
194                db \
195                xpfe/components/shistory \
196                docshell \
197                webshell \
198                profile \
199                embedding \
200                editor \
201                $(NULL)
202
203ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
204tier_9_dirs     += xpfe/bootstrap/appleevents
205endif
206
207tier_9_dirs     += \
208                xpfe/appshell \
209                xpfe/browser/public \
210                xpfe/components/sidebar/public \
211                xpfe/components/xremote/public \
212                $(NULL)
213
214ifdef MOZ_XUL_APP
215tier_9_dirs     += toolkit/components/history/public chrome
216else
217tier_9_dirs     += xpfe/components/history/public
218endif
219
220ifdef ACCESSIBILITY
221tier_9_dirs    += accessible
222endif
223
224ifdef MOZ_LDAP_XPCOM
225tier_9_dirs     += directory/xpcom
226endif
227
228#
229# tier 40 - security
230#
231ifdef MOZ_PSM
232tier_40_dirs    += security/manager
233endif
234
235#
236# tier 50 - xpfe & toolkit
237#
238
239# This must preceed xpfe
240ifdef MOZ_JPROF
241tier_50_dirs        += tools/jprof
242endif
243
244tier_50_dirs    += xpfe themes
245
246ifdef MOZ_LEAKY
247tier_50_dirs        += tools/leaky
248endif
249
250ifdef MOZ_MAPINFO
251tier_50_dirs    += tools/codesighs
252endif
253
254ifneq (,$(MOZ_L10N_LANG)$(MOZ_L10N_TOOLS))
255tier_50_dirs    += l10n
256endif
257
258ifdef MOZ_XUL_APP
259tier_50_dirs    += toolkit
260endif
261
262ifdef MINIMO
263tier_9_dirs     += embedding/minimo
264endif
265
266ifdef MOZ_PHOENIX
267# xpfe/components/search depends on nsIBookmarksService.idl
268tier_50_dirs    += browser/components/bookmarks/public
269endif
270
271# toolkit/xre/ depends on xpinstall, so it must be in tier 50
272ifdef MOZ_XPINSTALL
273tier_50_dirs     +=  xpinstall
274endif
275
276#
277# tier 9x - application features
278#
279
280ifdef MOZ_JSDEBUGGER
281tier_93_dirs    += js/jsd
282endif
283
284ifdef MOZ_EXTENSIONS
285tier_94_dirs    += extensions
286endif
287
288ifdef MOZ_MAIL_NEWS
289tier_97_dirs    += mailnews
290endif
291
292ifdef MOZ_CALENDAR
293tier_98_dirs    += other-licenses/libical calendar
294endif
295
296#
297# tier 99 - application binaries
298#
299
300ifdef MOZ_COMPONENTLIB
301tier_99_dirs   += embedding/componentlib
302else
303ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
304tier_99_dirs   += modules/staticmod
305endif
306endif # MOZ_COMPONENTLIB
307
308ifdef MOZ_PHOENIX
309tier_99_dirs    += browser
310endif
311
312ifdef MOZ_THUNDERBIRD
313tier_99_dirs    += mail
314endif
315
316ifdef MOZ_XUL_APP
317else
318ifneq (,$(MOZ_XPFE_COMPONENTS)$(MOZ_XUL))
319tier_99_dirs    += xpfe/bootstrap
320endif
321endif
322
323ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
324tier_99_dirs    += embedding/browser/gtk
325endif
326
327# viewer
328ifneq (,$(ENABLE_TESTS))
329tier_99_dirs += webshell/tests
330endif
331
332# winembed, mfcembed
333ifeq ($(OS_ARCH),WINNT)
334ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
335tier_99_dirs += embedding/tests
336endif
337endif
338
339# os2embed
340ifeq ($(OS_ARCH),OS2)
341ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
342tier_99_dirs += embedding/tests
343endif
344endif
345
346else
347
348# Standalone build
349
350DIRS            = $(BUILD_MODULE_DIRS)
351
352# Hack to generate xpidl Makefile
353ifneq ($(BUILD_MODULES),all)
354ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
355DIRS            := xpcom/typelib $(DIRS)
356SUBMAKEFILES    := xpcom/typelib/Makefile
357endif
358endif
359
360default: $(SUBMAKEFILES)
361        $(MAKE) export
362        $(MAKE) libs
363
364endif # BUILD_MODULES == all
365
366STATIC_MAKEFILES := nsprpub directory/c-sdk security/nss
367
368GARBAGE_DIRS += dist
369DIST_GARBAGE = config.cache config.log config.status config-defs.h \
370   dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
371   unallmakefiles mozilla-config.h \
372   $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
373
374# Build pseudo-external modules first when export is explicitly called
375export::
376        $(MAKE) -C config export
377        $(MAKE) nspr
378        $(MAKE) ldap
379ifneq ($(BUILD_MODULES),all)
380ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
381        $(MAKE) -C xpcom/typelib
382        $(MAKE) export-idl
383endif
384endif
385
386install::
387ifndef MOZ_NATIVE_NSPR
388        $(MAKE) -C nsprpub real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
389        $(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
390        $(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
391endif
392ifdef MOZ_LDAP_XPCOM
393        $(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
394endif
395
396include $(topsrcdir)/config/rules.mk
397
398# Clean up after pseudo-external modules
399clean clobber realclean clobber_all distclean::
400ifndef MOZ_NATIVE_NSPR
401        $(MAKE) -C nsprpub $@
402endif
403ifdef MOZ_LDAP_XPCOM
404        $(MAKE) -C directory/c-sdk $@
405endif
406
407tier_%:
408        @echo "$@: $($@_dirs)"
409        @$(EXIT_ON_ERROR) \
410                for d in $($@_dirs); do $(UPDATE_TITLE) \
411                        $(MAKE) -C $$d export; \
412                done ; \
413                $(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
414                for d in $($@_dirs); do $(UPDATE_TITLE) \
415                        $(MAKE) -C $$d libs; \
416                done
417#
418# Individual modules
419#
420boehm:
421ifdef GC_LEAK_DETECTOR
422        $(MAKE) -C gc/boehm
423endif
424
425nspr: boehm
426ifndef MOZ_NATIVE_NSPR
427        $(MAKE) -C nsprpub
428endif
429
430ldap:
431ifdef MOZ_LDAP_XPCOM
432        $(MAKE) -C directory/c-sdk
433endif
434
435export::
436        @$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
437
438distclean::
439        cat unallmakefiles | $(XARGS) rm -f
440        rm -f unallmakefiles $(DIST_GARBAGE)
441
442ifeq ($(OS_ARCH),WINNT)
443rebase:
444ifdef MOZILLA_OFFICIAL
445        echo rebasing $(DIST)
446        /bin/find $(DIST) -name "*.dll" > rebase.lst
447        rebase -b 60000000 -R . -G rebase.lst
448        rm rebase.lst
449endif
450
451splitsymbols:
452ifdef MOZILLA_OFFICIAL
453        echo splitting symbols out of binaries
454        /bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
455        /bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
456        /bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
457endif # MOZILLA_OFFICIAL
458
459signnss:
460ifdef MOZILLA_OFFICIAL
461        echo signing NSS libs
462        cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
463endif # MOZILLA_OFFICIAL
464
465deliver: splitsymbols rebase signnss
466
467endif # WINNT
468
Note: See TracBrowser for help on using the repository browser.