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

Revision 19518, 7.9 KB checked in by rbasch, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19517, 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        $(NULL)
93
94#
95# tier 1 -  3rd party individual libraries
96#
97tier_1_dirs     += dbm
98
99ifndef MOZ_NATIVE_JPEG
100tier_1_dirs     += jpeg
101endif
102
103ifndef MOZ_NATIVE_ZLIB
104tier_1_dirs     += modules/zlib
105endif
106
107# Installer needs standalone libjar, hence standalone zlib
108ifdef MOZ_INSTALLER
109tier_1_dirs     += modules/zlib/standalone
110endif
111
112ifdef MOZ_INTERNAL_LIBART_LGPL
113tier_1_dirs     += other-licenses/libart_lgpl
114endif
115
116#
117# tier 2 - base libraries
118#
119tier_2_dirs     = js
120
121# MacOSX needs to build lib for MoreFiles before xpcom
122ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
123tier_2_dirs += lib/mac/MoreFiles
124endif
125
126tier_2_dirs     += \
127                modules/libreg \
128                string \
129                xpcom \
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_JSDEBUGGER
155tier_9_dirs     += js/jsd
156endif
157
158ifdef MOZ_ENABLE_XLIB
159tier_9_dirs     += gfx/src/xlibrgb widget/src/xlibxtbin
160endif
161
162ifdef MOZ_ENABLE_GTK
163tier_9_dirs     += widget/src/gtksuperwin widget/src/gtkxtbin
164endif
165
166ifdef MOZ_ENABLE_GTK2
167tier_9_dirs     += widget/src/gtkxtbin
168endif
169
170ifdef MOZ_IPCD
171tier_9_dirs += ipc/ipcd
172endif
173
174tier_9_dirs     += \
175                modules/libutil \
176                netwerk \
177                uriloader \
178                modules/libpref \
179                modules/libimg \
180                caps \
181                rdf \
182                expat \
183                htmlparser \
184                gfx \
185                modules/libpr0n \
186                sun-java \
187                modules/plugin \
188                dom \
189                view \
190                widget \
191                content \
192                layout \
193                db \
194                xpfe/components/shistory \
195                docshell \
196                webshell \
197                profile \
198                embedding \
199                editor \
200                themes \
201                $(NULL)
202
203ifdef ACCESSIBILITY
204tier_9_dirs    += accessible
205endif
206
207ifdef MOZ_LDAP_XPCOM
208tier_9_dirs     += directory/xpcom
209endif
210
211# This must preceed xpfe
212ifdef MOZ_JPROF
213tier_9_dirs        += tools/jprof
214endif
215
216tier_9_dirs     += xpfe
217
218ifdef MOZ_XPINSTALL
219tier_9_dirs     +=  xpinstall
220endif
221
222ifdef MOZ_LEAKY
223tier_9_dirs        += tools/leaky
224endif
225
226ifdef MOZ_MAPINFO
227tier_9_dirs     += tools/codesighs
228endif
229
230ifneq (,$(MOZ_L10N_LANG)$(MOZ_L10N_TOOLS))
231tier_9_dirs     += l10n
232endif
233
234ifdef MOZ_PHOENIX
235tier_9_dirs     += toolkit
236# remove this when bug 201821 is fixed
237tier_9_dirs     += browser/components/bookmarks/public
238endif
239
240#
241# tier 9x - application features
242#
243
244ifdef MOZ_EXTENSIONS
245tier_94_dirs    += extensions
246endif
247
248ifdef MOZ_PSM
249tier_95_dirs    += security/manager
250endif
251
252ifdef MOZ_MAIL_NEWS
253tier_97_dirs    += mailnews
254endif
255
256ifdef MOZ_CALENDAR
257tier_98_dirs    += other-licenses/libical calendar
258endif
259
260#
261# tier 99 - application binaries
262#
263
264ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
265tier_99_dirs   += modules/staticmod
266endif
267
268ifdef MOZ_PHOENIX
269tier_99_dirs    += browser
270endif
271
272ifdef MOZ_THUNDERBIRD
273tier_99_dirs    += toolkit/xre mail
274endif
275
276ifdef MOZ_XUL_APP
277else
278ifneq (,$(MOZ_XPFE_COMPONENTS)$(MOZ_XUL))
279tier_99_dirs    += xpfe/bootstrap
280endif
281endif
282
283ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
284tier_99_dirs    += embedding/browser/gtk
285endif
286
287# viewer
288ifneq (,$(ENABLE_TESTS))
289tier_99_dirs += webshell/tests
290endif
291
292# winembed, mfcembed
293ifeq ($(OS_ARCH),WINNT)
294ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
295tier_99_dirs += embedding/tests
296endif
297endif
298
299# os2embed
300ifeq ($(OS_ARCH),OS2)
301ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
302tier_99_dirs += embedding/tests
303endif
304endif
305
306else
307
308# Standalone build
309
310DIRS            = $(BUILD_MODULE_DIRS)
311
312# Hack to generate xpidl Makefile
313ifneq ($(BUILD_MODULES),all)
314ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
315DIRS            := xpcom/typelib $(DIRS)
316SUBMAKEFILES    := xpcom/typelib/Makefile
317endif
318endif
319
320default: $(SUBMAKEFILES)
321        $(MAKE) export
322        $(MAKE) libs
323
324endif # BUILD_MODULES == all
325
326STATIC_MAKEFILES := nsprpub directory/c-sdk security/nss
327
328GARBAGE_DIRS += dist
329DIST_GARBAGE = config.cache config.log config.status config-defs.h \
330   dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
331   unallmakefiles mozilla-config.h \
332   $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
333
334# Build pseudo-external modules first when export is explicitly called
335export::
336        $(MAKE) -C config export
337        $(MAKE) nspr
338        $(MAKE) ldap
339ifneq ($(BUILD_MODULES),all)
340ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
341        $(MAKE) -C xpcom/typelib
342        $(MAKE) export-idl
343endif
344endif
345
346install::
347ifndef MOZ_NATIVE_NSPR
348        $(MAKE) -C nsprpub real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
349        $(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
350        $(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
351endif
352ifdef MOZ_LDAP_XPCOM
353        $(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
354endif
355
356include $(topsrcdir)/config/rules.mk
357
358# Clean up after pseudo-external modules
359clean clobber realclean clobber_all distclean::
360ifndef MOZ_NATIVE_NSPR
361        $(MAKE) -C nsprpub $@
362endif
363ifdef MOZ_LDAP_XPCOM
364        $(MAKE) -C directory/c-sdk $@
365endif
366
367tier_%:
368        @echo "$@: $($@_dirs)"
369        @$(EXIT_ON_ERROR) \
370                for d in $($@_dirs); do $(UPDATE_TITLE) \
371                        $(MAKE) -C $$d export; \
372                done ; \
373                $(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
374                for d in $($@_dirs); do $(UPDATE_TITLE) \
375                        $(MAKE) -C $$d libs; \
376                done
377#
378# Individual modules
379#
380boehm:
381ifdef GC_LEAK_DETECTOR
382        $(MAKE) -C gc/boehm
383endif
384
385nspr: boehm
386ifndef MOZ_NATIVE_NSPR
387        $(MAKE) -C nsprpub
388endif
389
390ldap:
391ifdef MOZ_LDAP_XPCOM
392        $(MAKE) -C directory/c-sdk
393endif
394
395export::
396        @$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
397
398distclean::
399        cat unallmakefiles | $(XARGS) rm -f
400        rm -f unallmakefiles $(DIST_GARBAGE)
401
402ifeq ($(OS_ARCH),WINNT)
403rebase:
404ifdef MOZILLA_OFFICIAL
405        echo rebasing $(DIST)
406        /bin/find $(DIST) -name "*.dll" > rebase.lst
407        rebase -b 60000000 -R . -G rebase.lst
408        rm rebase.lst
409endif
410
411splitsymbols:
412ifdef MOZILLA_OFFICIAL
413        echo splitting symbols out of binaries
414        /bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
415        /bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
416        /bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
417endif # MOZILLA_OFFICIAL
418
419signnss:
420ifdef MOZILLA_OFFICIAL
421        echo signing NSS libs
422        cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
423endif # MOZILLA_OFFICIAL
424
425deliver: splitsymbols rebase signnss
426
427endif # WINNT
428
Note: See TracBrowser for help on using the repository browser.