Bug 575870 - Enable the firefox button on xp themed, classic, and aero basic. r=dao...
[mozilla-central.git] / toolkit / xre / Makefile.in
blob141c68b7adee11f16a9a507375cc34f0a87dce3d
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is mozilla.org code.
16 # The Initial Developer of the Original Code is
17 # Netscape Communications.
18 # Portions created by the Initial Developer are Copyright (C) 2001
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
22 # Brian Ryner <bryner@brianryner.com>
23 # Benjamin Smedberg <benjamin@smedbergs.us>
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 DEPTH = ../..
40 topsrcdir = @top_srcdir@
41 srcdir = @srcdir@
42 VPATH = @srcdir@
44 include $(DEPTH)/config/autoconf.mk
46 MODULE = xulapp
47 LIBRARY_NAME = xulapp_s
48 LIBXUL_LIBRARY = 1
50 FORCE_STATIC_LIB = 1
52 XPIDLSRCS = \
53 nsINativeAppSupport.idl \
54 $(NULL)
56 ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
57 XPIDLSRCS += nsIWinAppHelper.idl
58 endif
60 CPPSRCS = \
61 nsAppRunner.cpp \
62 nsConsoleWriter.cpp \
63 nsXREDirProvider.cpp \
64 nsNativeAppSupportBase.cpp \
65 nsAppData.cpp \
66 nsSigHandlers.cpp \
67 $(NULL)
69 ifdef MOZ_SPLASHSCREEN
70 ifeq ($(OS_ARCH),WINCE)
71 CPPSRCS += nsSplashScreenWin.cpp
72 else
73 CPPSRCS += nsSplashScreenDummy.cpp
74 endif
75 endif
77 DEFINES += -DIMPL_XREAPI -DMOZ_APP_NAME='"$(MOZ_APP_NAME)"'
79 ifndef BUILD_STATIC_LIBS
80 CPPSRCS += nsEmbedFunctions.cpp
81 endif
83 ifdef MOZ_UPDATER
84 CPPSRCS += nsUpdateDriver.cpp
85 DEFINES += -DMOZ_UPDATER
86 endif
88 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
89 CPPSRCS += nsNativeAppSupportWin.cpp
90 DEFINES += -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE
91 EXPORTS = nsWindowsDllInterceptor.h
92 else
93 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
94 CMMSRCS = nsNativeAppSupportCocoa.mm
95 else
96 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
97 CPPSRCS += nsNativeAppSupportOS2.cpp
98 else
99 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
100 CPPSRCS += nsNativeAppSupportBeOS.cpp
101 else
102 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
103 CPPSRCS += nsNativeAppSupportUnix.cpp
104 else
105 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
106 CPPSRCS += nsNativeAppSupportQt.cpp
107 CPPSRCS += nsQAppInstance.cpp
108 EXPORTS += nsQAppInstance.h
109 ifdef MOZ_ENABLE_MEEGOTOUCH
110 MOCSRCS += moc_MozMeegoAppService.cpp
111 CPPSRCS += moc_MozMeegoAppService.cpp
112 endif
113 else
114 CPPSRCS += nsNativeAppSupportDefault.cpp
115 endif
116 endif
117 endif
118 endif
119 endif
120 endif
122 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
123 CMMSRCS += MacLaunchHelper.mm
124 CMMSRCS += MacApplicationDelegate.mm
125 CMMSRCS += MacAutoreleasePool.mm
126 CPPSRCS += nsCommandLineServiceMac.cpp
127 OS_CXXFLAGS += -fexceptions
128 endif
130 ifdef MOZ_X11
131 CPPSRCS += nsX11ErrorHandler.cpp
132 endif
134 ifeq ($(OS_TARGET),Android)
135 CPPSRCS += nsAndroidStartup.cpp
136 endif
138 SHARED_LIBRARY_LIBS += ../profile/src/$(LIB_PREFIX)profile_s.$(LIB_SUFFIX)
140 ifdef MOZ_ENABLE_XREMOTE
141 SHARED_LIBRARY_LIBS += $(DEPTH)/widget/src/xremoteclient/$(LIB_PREFIX)xremote_client_s.$(LIB_SUFFIX)
142 LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/xremoteclient
143 endif
145 ifdef MOZ_CRASHREPORTER
146 SHARED_LIBRARY_LIBS += $(DEPTH)/toolkit/crashreporter/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX)
147 ifeq ($(OS_ARCH),WINNT)
148 SHARED_LIBRARY_LIBS += \
149 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/windows/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
150 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/$(LIB_PREFIX)crash_generation_s.$(LIB_SUFFIX) \
151 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/windows/$(LIB_PREFIX)breakpad_windows_common_s.$(LIB_SUFFIX)
152 endif
154 ifeq ($(OS_ARCH),Darwin)
155 SHARED_LIBRARY_LIBS += \
156 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/$(LIB_PREFIX)minidump_file_writer_s.$(LIB_SUFFIX) \
157 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/$(LIB_PREFIX)crash_generation_s.$(LIB_SUFFIX) \
158 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/mac/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
159 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
160 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/mac/$(LIB_PREFIX)breakpad_mac_common_s.$(LIB_SUFFIX)
161 endif
163 ifeq ($(OS_ARCH),Linux)
164 SHARED_LIBRARY_LIBS += \
165 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/$(LIB_PREFIX)crash_generation_s.$(LIB_SUFFIX) \
166 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/linux/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
167 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/$(LIB_PREFIX)minidump_writer_s.$(LIB_SUFFIX) \
168 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/$(LIB_PREFIX)minidump_file_writer_s.$(LIB_SUFFIX) \
169 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
170 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \
171 $(NULL)
172 endif
174 ifeq ($(OS_ARCH),SunOS)
175 SHARED_LIBRARY_LIBS += \
176 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
177 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/$(LIB_PREFIX)minidump_file_writer_s.$(LIB_SUFFIX) \
178 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
179 $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/solaris/$(LIB_PREFIX)breakpad_solaris_common_s.$(LIB_SUFFIX) \
180 $(NULL)
181 endif
182 endif
184 ifdef ENABLE_TESTS
185 DIRS += test
186 endif
188 include $(topsrcdir)/config/config.mk
189 include $(topsrcdir)/ipc/chromium/chromium-config.mk
190 include $(topsrcdir)/config/rules.mk
192 LOCAL_INCLUDES += \
193 -I$(topsrcdir)/dom/ipc \
194 -I$(topsrcdir)/toolkit/crashreporter \
195 $(NULL)
197 ifdef BUILD_STATIC_LIBS
198 export::
199 @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_COMP_NAMES) Apprunner
200 endif
202 LOCAL_INCLUDES += \
203 -I$(srcdir) \
204 -I$(srcdir)/../profile/src \
205 -I$(topsrcdir)/config \
206 $(NULL)
208 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
210 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
211 CXXFLAGS += $(MOZ_PANGO_CFLAGS)
212 endif
214 ifdef BUILD_STATIC_LIBS
215 DEFINES += -D_BUILD_STATIC_BIN
216 endif
218 DEFINES += \
219 -DOS_TARGET=\"$(OS_TARGET)\" \
220 -DMOZ_WIDGET_TOOLKIT=\"$(MOZ_WIDGET_TOOLKIT)\"
222 ifdef TARGET_XPCOM_ABI
223 DEFINES += \
224 -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" \
225 -DTARGET_OS_ABI=\"$(OS_TARGET)_$(TARGET_XPCOM_ABI)\" \
226 $(NULL)
227 endif
229 DEFINES += -DTOOLKIT_EM_VERSION=\"$(shell $(PERL) $(topsrcdir)/config/milestone.pl --topsrcdir=$(topsrcdir))\"
231 ifdef WRAP_SYSTEM_INCLUDES
232 DEFINES += -DWRAP_SYSTEM_INCLUDES
233 endif
235 ifeq ($(OS_ARCH),Linux)
236 ifneq (,$(findstring lib64,$(libdir)))
237 DEFINES += -DHAVE_USR_LIB64_DIR
238 endif
239 endif
241 MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
242 # strip a trailing slash from the repo URL because it's not always present,
243 # and we want to construct a working URL in buildconfig.html
244 # make+shell+sed = awful
245 _dollar=$$
246 SOURCE_REPO := $(shell cd $(topsrcdir) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
248 ifdef MOZ_SOURCE_STAMP
249 INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP)
250 # extra sanity check for old versions of hg
251 # that don't support showconfig
252 ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
253 INIARGS += --sourcerepo=$(SOURCE_REPO)
254 endif
255 endif
257 # Solaris /usr/bin/diff doesn't have -n option
258 GRE_MILESTONE := $(shell tail -n 1 $(topsrcdir)/config/milestone.txt 2>/dev/null || tail -1 $(topsrcdir)/config/milestone.txt)
259 GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
261 DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
263 $(srcdir)/nsAppRunner.cpp: $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
265 platform.ini: FORCE
266 $(PYTHON) $(srcdir)/make-platformini.py --buildid=$(shell cat $(DEPTH)/config/buildid) $(INIARGS) $(topsrcdir)/config/milestone.txt > $@
268 GARBAGE += platform.ini
270 libs:: platform.ini
271 $(INSTALL) $^ $(DIST)/bin
273 install::
274 $(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)