forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
265 lines (219 loc) · 6.41 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Benjamin Smedberg <benjamin@smedbergs.us>
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_RDF
include $(topsrcdir)/rdf/util/src/objs.mk
endif
include $(topsrcdir)/intl/unicharutil/util/objs.mk
MODULE = libxul
LIBRARY_NAME = xul
FORCE_USE_PIC = 1
FORCE_SHARED_LIB = 1
MOZILLA_INTERNAL_API = 1
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
# This is going to be a framework named "XUL", not an ordinary library named
# "libxul.dylib"
LIBRARY_NAME=XUL
# Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
# setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
# as-is so that dependencies of the form -ltracemalloc still work.
MAKE_FRAMEWORK=1
endif
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
CPPSRCS += dlldeps-xul.cpp
endif
ifeq ($(OS_ARCH),WINCE)
CPPSRCS += dlldeps-xul.cpp
endif
ifeq ($(OS_ARCH),OS2)
CPPSRCS += dlldeps-xul.cpp
endif
ifneq (,$(MOZ_ENABLE_GTK2))
DEFINES += -DMOZ_ENABLE_GTK2
endif
SHARED_LIBRARY_LIBS += \
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
$(NULL)
SHARED_LIBRARY_LIBS += \
$(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
$(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
$(NULL)
ifdef MOZ_ENABLE_LIBXUL
include $(srcdir)/libxul-config.mk
EXTRA_DEPS += \
$(srcdir)/libxul-config.mk \
$(srcdir)/libxul-rules.mk \
$(topsrcdir)/intl/unicharutil/util/objs.mk \
$(NULL)
CPPSRCS += \
$(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
$(NULL)
GARBAGE += \
$(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
$(wildcard *.$(OBJ_SUFFIX)) \
dlldeps-javaxpcom.cpp \
$(NULL)
LOCAL_INCLUDES += -I$(topsrcdir)/intl/unicharutil/util \
-I$(topsrcdir)/intl/unicharutil/src
ifdef MOZ_RDF
EXTRA_DEPS += \
$(topsrcdir)/rdf/util/src/objs.mk \
$(NULL)
CPPSRCS += \
$(RDF_UTIL_SRC_LCPPSRCS) \
$(NULL)
GARBAGE += \
$(RDF_UTIL_SRC_LCPPSRCS) \
$(NULL)
endif
endif
ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
SDK_LIBRARY = $(IMPORT_LIBRARY)
else
SDK_LIBRARY = $(SHARED_LIBRARY)
endif
EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
ifndef MOZ_ENABLE_LIBXUL
EXTRA_DSO_LDOPTS += \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
$(NULL)
endif
DEFINES += -DIMPL_XREAPI
EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CXXFLAGS += $(TK_CFLAGS)
OS_LIBS += \
-framework SystemConfiguration \
-framework QuickTime \
-framework IOKit \
-lcrypto \
$(TK_LIBS) \
$(NULL)
endif
ifeq ($(OS_ARCH),Darwin)
ifdef MOZ_SYDNEYAUDIO
EXTRA_DSO_LDOPTS += \
-framework Carbon \
-framework CoreAudio \
-framework AudioToolbox \
-framework AudioUnit \
$(NULL)
endif
endif
ifdef MOZ_PLATFORM_MAEMO
EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS)
endif
ifdef MOZ_ENABLE_LIBCONIC
EXTRA_DSO_LDOPTS += $(LIBCONIC_LIBS)
endif
ifdef MOZ_ENABLE_DBUS
EXTRA_DSO_LDOPTS += $(MOZ_DBUS_LIBS)
ifdef MOZ_PLATFORM_MAEMO
EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
endif
endif
ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
endif
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0
EXTRA_DSO_LDOPTS += $(FT2_LIBS) $(MOZ_PANGO_LIBS)
endif
ifdef MOZ_TREE_FREETYPE
ifndef MOZ_TREE_CAIRO
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
endif
endif
ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
endif
ifdef MOZ_ENABLE_LIBPROXY
EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS)
endif
ifeq ($(OS_ARCH),SunOS)
ifdef GNU_CC
EXTRA_DSO_LDOPTS += -lelf
else
EXTRA_DSO_LDOPTS += -lelf -ldemangle
endif
endif
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32 shlwapi psapi ws2_32 dbghelp)
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
OS_LIBS += $(call EXPAND_LIBNAME,imagehlp)
endif
ifdef MOZ_CRASHREPORTER
OS_LIBS += $(call EXPAND_LIBNAME,wininet)
endif
endif # WINNT
ifeq ($(OS_ARCH),WINCE)
OS_LIBS += $(call EXPAND_LIBNAME, aygshell uuid ole32 oleaut32 Ws2 ddraw)
OS_LIBS += $(call EXPAND_LIBNAME, ceosutil libcmt comsuppw)
ifdef WINCE_WINDOWS_MOBILE
OS_LIBS += $(call EXPAND_LIBNAME, cellcore)
endif
ifdef HAS_OGLES
OS_LIBS += $(call EXPAND_LIBNAME, libGLESv2 libEGL)
endif
endif
ifdef MOZ_JPROF
EXTRA_DSO_LDOPTS += -ljprof
endif
ifdef MOZ_ENABLE_QT
EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) $(XEXT_LIBS)
endif
include $(topsrcdir)/config/rules.mk
export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
$(INSTALL) $^ .
ifdef MOZ_ENABLE_LIBXUL
include $(srcdir)/libxul-rules.mk
endif
ifdef MOZ_JAVAXPCOM
dlldeps-javaxpcom.cpp: $(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
$(INSTALL) $^ .
endif
ifdef MOZ_DEBUG
ifdef ENABLE_TESTS
DEFINES += -DENABLE_LAYOUTDEBUG
endif
endif