source: trunk/third/mozilla/xpfe/bootstrap/Makefile.in @ 19164

Revision 19164, 7.9 KB checked in by rbasch, 21 years ago (diff)
Add a mozilla wrapper for athena, installed instead of the stock bootstrap script.
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
29# This code removes the console from release builds
30# (unless you've set MOZ_WINCONSOLE=1).
31ifndef MOZ_WINCONSOLE
32ifdef MOZ_DEBUG
33MOZ_WINCONSOLE=1
34else
35MOZ_WINCONSOLE=0
36endif
37endif
38
39MODULE          = apprunner
40REQUIRES        = xpcom \
41                  xpconnect \
42                  string \
43                  webbrwsr \
44                  widget \
45                  dom \
46                  necko \
47                  pref \
48                  appshell \
49                  gfx \
50                  chrome \
51                  xpinstall \
52                  uriloader \
53                  view \
54                  windowwatcher \
55                  embed_base \
56                  embedcomponents \
57                  mpfilelocprovider \
58                  browser \
59                  docshell \
60                  uconv \
61                  locale \
62                  xremoteservice \
63                  profile \
64                  $(NULL)
65# for jprof
66REQUIRES        += jprof
67ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
68REQUIRES        += \
69                  intl \
70                  profile \
71                  $(NULL)
72endif
73ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
74REQUIRES        += intl profile appcomps
75endif
76
77include $(topsrcdir)/config/config.mk
78
79ifeq ($(USE_SHORT_LIBNAME),1)
80PROGRAM         = mozilla$(BIN_SUFFIX)
81else
82PROGRAM         = mozilla-bin$(BIN_SUFFIX)
83endif
84
85CPPSRCS         = \
86                nsAppRunner.cpp \
87                nsWindowCreator.cpp \
88                showOSAlert.cpp \
89                $(NULL)
90
91ifneq ($(OS_ARCH),WINNT)
92CPPSRCS         += nsSigHandlers.cpp
93endif
94
95XP_LIBS         = \
96                $(EXTRA_DSO_LDOPTS) \
97                $(EXTRA_DSO_LIBS) \
98                $(NULL)
99
100ifndef BUILD_STATIC_LIBS
101
102EXTRA_DSO_LIBS += gkgfx mpfilelocprovider_s
103ifdef MOZ_OJI
104ifeq ($(OS_ARCH),WINNT)
105EXTRA_DSO_LIBS += jsj$(MOZ_BITS)$(VERSION_NUMBER)
106else
107EXTRA_DSO_LIBS += jsj
108endif
109endif
110
111else
112include $(topsrcdir)/config/static-config.mk
113
114EXTRA_DEPS      += \
115        $(STATIC_EXTRA_DEPS) \
116        $(NULL)
117DEFINES         += $(STATIC_DEFINES)
118CPPSRCS         += $(STATIC_CPPSRCS)
119EXTRA_DSO_LDOPTS+= -L$(DEPTH)/dist/lib/components
120EXTRA_DSO_LIBS  += $(STATIC_EXTRA_DSO_LIBS)
121REQUIRES        += $(STATIC_REQUIRES)
122XP_LIBS         += $(STATIC_EXTRA_LIBS)
123
124endif
125
126XP_LIBS         += \
127                $(MOZ_JS_LIBS) \
128                $(XPCOM_LIBS) \
129                $(NSPR_LIBS) \
130                $(NULL)
131
132ifdef NS_TRACE_MALLOC
133DEFINES         += -DNS_TRACE_MALLOC
134endif
135
136ifdef MOZ_JPROF
137XP_LIBS         += -ljprof
138endif
139
140LIBS            = $(XP_LIBS)
141
142ifdef GC_LEAK_DETECTOR
143LIBS += -lboehm
144endif
145
146ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
147BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc
148CPPSRCS += nsNativeAppSupportBeOS.cpp
149CPPSRCS += nsNativeAppSupportBase.cpp
150endif
151
152ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
153CPPSRCS += nsNativeAppSupportPh.cpp
154LIBS += -lphexlib -lph
155endif
156
157ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
158CPPSRCS += nsNativeAppSupportOS2.cpp
159CPPSRCS += nsNativeAppSupportBase.cpp
160RESFILE = splashos2.res
161endif
162
163ifeq ($(MOZ_WIDGET_TOOLKIT),mac)
164LIBS    += $(TK_LIBS)
165endif
166
167ifeq ($(MOZ_WIDGET_TOOLKIT),gtk)
168SPLASH_XPM = $(srcdir)/splash.xpm
169CPPSRCS += nsNativeAppSupportGtk.cpp \
170           nsNativeAppSupportBase.cpp
171DEFINES += -DSPLASH_XPM=\"$(SPLASH_XPM)\"
172LIBS += $(MOZ_GTK_LDFLAGS)
173endif
174
175ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
176RCINCLUDE = splash.rc
177CPPSRCS += nsNativeAppSupportWin.cpp nsNativeAppSupportBase.cpp
178OS_LIBS += comctl32.lib comdlg32.lib uuid.lib shell32.lib ole32.lib oleaut32.lib version.lib winspool.lib
179endif
180
181ifneq (,$(filter windows os2 gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
182ifneq (,$(filter windows os2,$(MOZ_WIDGET_TOOLKIT)))
183ICON_SUFFIX=.ico
184else
185ICON_SUFFIX=.xpm
186endif
187
188ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
189ICON_DIR=gtk
190else
191ICON_DIR=$(MOZ_WIDGET_TOOLKIT)
192endif
193
194DESKTOP_ICONS = \
195        abcardWindow \
196        addressbookWindow \
197        bmPropsWindow \
198        bookmark-window \
199        calendar-window \
200        chatzilla-window \
201        downloadManager \
202        editorWindow \
203        findBookmarkWindow \
204        findHistoryWindow \
205        history-window \
206        jsconsoleWindow \
207        main-window \
208        messengerWindow \
209        msgcomposeWindow \
210        venkman-window \
211        winInspectorMain \
212        $(NULL)
213
214ifeq ($(ICON_DIR),gtk)
215DESKTOP_ICONS_SMALL=$(patsubst %,%16,$(DESKTOP_ICONS))
216endif
217
218DESKTOP_ICON_FILES = $(addsuffix $(ICON_SUFFIX), $(DESKTOP_ICONS) $(DESKTOP_ICONS_SMALL))
219
220GARBAGE += $(addprefix $(DIST)/bin/chrome/icons/default/,$(DESKTOP_ICON_FILES))
221
222libs:: $(addprefix icons/$(ICON_DIR)/,$(DESKTOP_ICON_FILES))
223        $(INSTALL) $^ $(DIST)/bin/chrome/icons/default
224
225install:: $(addprefix icons/$(ICON_DIR)/,$(DESKTOP_ICON_FILES))
226        $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/chrome/icons/default
227endif
228
229ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
230CMMSRCS += nsNativeAppSupportForCocoa.mm
231LDFLAGS += \
232        -framework Cocoa \
233        $(NULL)   
234endif
235
236ifeq ($(OS_ARCH),OS2)
237ifdef BUILD_STATIC_LIBS
238EXE_DEF_FILE = mozilla.def
239endif
240endif
241
242include $(topsrcdir)/config/rules.mk
243
244ifdef BUILD_STATIC_LIBS
245include $(topsrcdir)/config/static-rules.mk
246endif
247
248ifeq ($(MOZ_WIDGET_TOOLKIT),gtk)
249$(PROGRAM): $(SPLASH_XPM)
250endif
251
252ifeq ($(OS_ARCH),Darwin)
253EXTRA_DSO_LDOPTS := $(subst -dynamiclib -install_name @executable_path/\$@ -compatibility_version 1 -current_version 1,-execute,$(EXTRA_DSO_LDOPTS))
254
255ifdef BUILD_STATIC_LIBS
256LDFLAGS += -framework QuickTime $(TK_LIBS)
257endif
258
259endif
260
261ifeq ($(OS_ARCH),WINNT)
262#
263# Control the default heap size.
264# This is the heap returned by GetProcessHeap().
265# As we use the CRT heap, the default size is too large and wastes VM.
266#
267# The default heap size is 1MB on Win32.
268# The heap will grow if need be.
269#
270# Set it to 256k.  See bug 127069.
271#
272LDFLAGS += /HEAP:0x40000
273endif
274
275CXXFLAGS        += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
276
277LOCAL_INCLUDES  = -I$(srcdir)
278
279ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
280mozilla.1: mozilla.man.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
281        @sed -e "s|\@bindir\@|${bindir}|" -e "s|\@libdir\@|${libdir}|" \
282                -e "s|\@mozilla_version\@|${MOZILLA_VERSION}|" < $< > $@
283
284libs:: mozilla.1
285        $(INSTALL) $< $(DIST)/man/man1
286
287install:: mozilla.1
288        $(SYSINSTALL) $(IFLAGS1) $< $(DESTDIR)$(mandir)/man1
289
290MOZILLA_SCRIPT=mozilla
291
292$(MOZILLA_SCRIPT):: mozilla.athena.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
293        cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
294                -e "s|%MREDIR%|$(mredir)|" \
295                -e "s|mozilla-bin|$(PROGRAM)|g" > $@
296        chmod +x $@
297
298libs:: $(MOZILLA_SCRIPT)
299        $(INSTALL) $< $(DIST)/bin
300
301install:: $(MOZILLA_SCRIPT)
302        $(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir)
303
304GARBAGE += mozilla.1 $(MOZILLA_SCRIPT)
305
306endif
307
308ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
309libs:: $(srcdir)/splash.bmp
310        $(INSTALL) $< $(DIST)/bin
311endif
312
313ifeq ($(OS_ARCH),OS2)
314ifdef BUILD_STATIC_LIBS
315$(EXE_DEF_FILE):
316        rm -f $@
317        @echo NAME mozilla >$(EXE_DEF_FILE)
318        @echo IMPORTS >>$(EXE_DEF_FILE)
319        @echo   WinQueryProperty                = PMMERGE.5450 >>$(EXE_DEF_FILE)
320        @echo   WinRemoveProperty               = PMMERGE.5451 >>$(EXE_DEF_FILE)
321        @echo   WinSetProperty                  = PMMERGE.5452 >>$(EXE_DEF_FILE)
322        @echo   DaxOpenSave                                     = PMCTLS.295   >>$(EXE_DEF_FILE)
323endif
324endif
325
326ifeq ($(MOZ_REORDER),1)
327
328LDSCRIPT = ldscript
329LDFLAGS += -Wl,-T,$(LDSCRIPT)
330GARBAGE += $(LDSCRIPT)
331ORDERFILE = $(srcdir)/mozilla-bin.order
332
333$(PROGRAM) : $(LDSCRIPT) $(ORDERFILE)
334
335$(LDSCRIPT): $(ORDERFILE)
336        $(PERL) $(topsrcdir)/config/mklinkscript.pl -o $@ $<
337
338endif
339
340ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
341
342ifdef MOZ_DEBUG
343APP_NAME = MozillaDebug
344else
345APP_NAME = Mozilla
346endif
347
348libs:: $(PROGRAM)
349        rm -rf $(DIST)/$(APP_NAME).app
350        mkdir $(DIST)/$(APP_NAME).app
351        cp -R $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app
352        cp -RL $(DIST)/bin $(DIST)/$(APP_NAME).app/Contents/MacOS
353        cp -RL $(srcdir)/macbuild/mach.icns $(DIST)/$(APP_NAME).app/Contents/Resources/mach.icns
354        echo APPLMOZZ > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
355endif
356
357libs::
358        touch $(DIST)/bin/.autoreg
359
360echo_objs:
361        @echo $(OBJS)
362
363README_FILE = $(topsrcdir)/README.txt
364
365libs::
366        $(INSTALL) $(README_FILE) $(DIST)/bin
367        $(INSTALL) $(topsrcdir)/LICENSE $(DIST)/bin
Note: See TracBrowser for help on using the repository browser.