Bug 463982 - Drop configure support for cairo-mac widget toolkit, r=ted
[wine-gecko.git] / Makefile.in
blobe5e69e9e39f022c9938c8392967ec381fa020b41
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
15 # The Original Code is mozilla.org code.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 DEPTH = .
39 topsrcdir = @top_srcdir@
40 srcdir = @srcdir@
41 VPATH = @srcdir@
43 include $(DEPTH)/config/autoconf.mk
45 include $(topsrcdir)/config/config.mk
47 default alldep all::
48 $(RM) -rf $(DIST)/sdk
49 $(RM) -rf $(DIST)/include
50 $(RM) -rf $(DIST)/private
51 $(RM) -rf $(DIST)/public
52 $(RM) -rf $(DIST)/bin/components
53 $(RM) -rf _tests
55 TIERS += base
58 # tier "base" - basic setup
60 tier_base_dirs = \
61 config \
62 build \
63 probes \
64 $(NULL)
66 ifdef MOZ_MEMORY
67 tier_base_dirs += memory/jemalloc
68 endif
70 ifdef ENABLE_TESTS
71 # Additional makefile targets to call automated test suites
72 include $(topsrcdir)/testing/testsuite-targets.mk
73 endif
75 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
77 TIERS += testharness
79 # test harnesses
80 ifdef ENABLE_TESTS
81 tier_testharness_dirs += tools/test-harness
82 endif
84 GARBAGE_DIRS += dist _javagen _profile _tests staticlib
85 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
86 dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
87 unallmakefiles mozilla-config.h \
88 netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
89 $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
91 # Build pseudo-external modules first when export is explicitly called
92 export::
93 $(RM) -rf $(DIST)/sdk
94 $(MAKE) -C config export
95 $(MAKE) tier_nspr
97 include $(topsrcdir)/config/rules.mk
99 # After we build tier toolkit, go back and build the tools from previous dirs
100 tier_toolkit::
101 $(MAKE) tools_tier_js
102 $(MAKE) tools_tier_xpcom
103 $(MAKE) tools_tier_necko
104 $(MAKE) tools_tier_gecko
105 $(MAKE) tools_tier_toolkit
107 ifeq (netwerk,$(MOZ_BUILD_APP))
108 tier_necko::
109 $(EXIT_ON_ERROR) \
110 $(foreach tier,$(TIERS),$(MAKE) tools_tier_$(tier); )
111 endif
113 distclean::
114 cat unallmakefiles | $(XARGS) rm -f
115 rm -f unallmakefiles $(DIST_GARBAGE)
117 ifeq ($(OS_ARCH),WINNT)
118 rebase:
119 ifdef MOZILLA_OFFICIAL
120 echo rebasing $(DIST)
121 /bin/find $(DIST) -name "*.dll" -a -not -name "msvc*" > rebase.lst
122 rebase -b 60000000 -R . -G rebase.lst
123 rm rebase.lst
124 endif
126 splitsymbols:
127 ifdef MOZILLA_OFFICIAL
128 ifdef MOZ_DEBUG_SYMBOLS
129 echo finding pdb files
130 mkdir -p $(DIST)/$(BUILDID)
131 -cp `/bin/find . -path "./dist" -prune -o -name "*.dll" | sed "s/\.dll$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
132 -cp `/bin/find . -path "./dist" -prune -o -name "*.exe" | sed "s/\.exe$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
133 -cp `/bin/find . -path "./dist" -prune -o -name "*.EXE" | sed "s/\.EXE$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
134 endif # MOZ_DEBUG_SYMBOLS
135 ifdef MOZ_PROFILE
136 echo splitting symbols out of binaries
137 /bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
138 /bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
139 /bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
140 mkdir -p $(DIST)/$(BUILDID)
141 /bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
142 endif # MOZ_PROFILE
143 endif # MOZILLA_OFFICIAL
144 endif # WINNT
146 ifeq ($(OS_ARCH),WINNT)
147 # we want to copy PDB files on Windows
148 MAKE_SYM_STORE_ARGS := -c
149 ifdef PDBSTR_PATH
150 MAKE_SYM_STORE_ARGS += -i
151 endif
152 ifeq (,$(CYGWIN_WRAPPER))
153 # this doesn't work with Cygwin Python
154 MAKE_SYM_STORE_ARGS += --vcs-info
155 endif
156 DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms.exe
157 # PDB files don't get moved to dist, so we need to scan the whole objdir
158 MAKE_SYM_STORE_PATH := .
159 endif
160 ifeq ($(OS_ARCH),Darwin)
161 # need to pass arch flags for universal builds
162 ifdef UNIVERSAL_BINARY
163 MAKE_SYM_STORE_ARGS := -a "ppc i386" --vcs-info
164 MAKE_SYM_STORE_PATH := $(DIST)/universal
165 else
166 MAKE_SYM_STORE_ARGS := -a $(OS_TEST) --vcs-info
167 MAKE_SYM_STORE_PATH := $(DIST)/bin
168 endif
169 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
170 endif
171 ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
172 MAKE_SYM_STORE_ARGS := --vcs-info
173 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
174 MAKE_SYM_STORE_PATH := $(DIST)/bin
175 endif
177 ifdef MOZ_SYMBOLS_EXTRA_BUILDID
178 EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
179 endif
181 SYMBOL_ARCHIVE_BASENAME = \
182 $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)$(EXTRA_BUILDID)
184 buildsymbols:
185 ifdef MOZ_CRASHREPORTER
186 echo building symbol store
187 mkdir -p $(DIST)/crashreporter-symbols/$(BUILDID)
188 $(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
189 $(MAKE_SYM_STORE_ARGS) -s $(topsrcdir) $(DUMP_SYMS_BIN) \
190 $(DIST)/crashreporter-symbols/$(BUILDID) \
191 $(MAKE_SYM_STORE_PATH) > \
192 $(DIST)/crashreporter-symbols/$(BUILDID)/$(SYMBOL_ARCHIVE_BASENAME)-symbols.txt
193 echo packing symbols
194 mkdir -p $(topsrcdir)/../$(BUILDID)
195 cd $(DIST)/crashreporter-symbols/$(BUILDID) && \
196 zip -r9D ../crashreporter-symbols-$(SYMBOL_ARCHIVE_BASENAME).zip .
197 mv $(DIST)/crashreporter-symbols/crashreporter-symbols-$(SYMBOL_ARCHIVE_BASENAME).zip \
198 $(topsrcdir)/../$(BUILDID)
199 endif # MOZ_CRASHREPORTER
201 uploadsymbols:
202 ifdef MOZ_CRASHREPORTER
203 $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(topsrcdir)/../$(BUILDID)/crashreporter-symbols-$(SYMBOL_ARCHIVE_BASENAME).zip
204 endif
206 ifeq ($(OS_ARCH),WINNT)
207 signnss:
208 ifdef MOZILLA_OFFICIAL
209 echo signing NSS libs
210 cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
211 cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
212 endif # MOZILLA_OFFICIAL
214 deliver: splitsymbols rebase signnss
216 endif # WINNT
218 ifneq (,$(wildcard $(DIST)/bin/application.ini))
219 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
220 else
221 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
222 endif
224 #XXX: this is a hack, since we don't want to clobber for MSVC
225 # PGO support, but we can't do this test in client.mk
226 ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
227 # No point in clobbering if PGO has been explicitly disabled.
228 ifndef NO_PROFILE_GUIDED_OPTIMIZE
229 maybe_clobber_profiledbuild: clobber_all
230 else
231 maybe_clobber_profiledbuild:
232 endif
233 else
234 maybe_clobber_profiledbuild:
235 endif
237 .PHONY: maybe_clobber_profiledbuild