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

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