Bug 839650: proxy AddTrack() to MSG thread via a custom command so we can get access...
[gecko.git] / config / Makefile.in
blob5f6e8b153964e1ef142baead8faf22d6f9fdb47d
1 # -*- Makefile -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 DEPTH = @DEPTH@
8 topsrcdir = @top_srcdir@
9 srcdir = @srcdir@
10 VPATH = @srcdir@
12 include $(DEPTH)/config/autoconf.mk
14 # For sanity's sake, we compile nsinstall without the wrapped system
15 # headers, so that we can use it to set up the wrapped system headers.
16 VISIBILITY_FLAGS =
18 # STDCXX_COMPAT is not needed here, and will actually fail because
19 # libstdc++-compat is not built yet.
20 STDCXX_COMPAT =
22 ifneq (WINNT,$(HOST_OS_ARCH))
23 HOST_PROGRAM = nsinstall_real$(HOST_BIN_SUFFIX)
24 HOST_CSRCS = nsinstall.c pathsub.c
25 endif
27 ifndef CROSS_COMPILE
28 ifdef USE_ELF_DYNSTR_GC
29 export:: elf-dynstr-gc
30 endif
31 endif
33 # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
34 # a recursive rule for finding nsinstall and the Perl scripts.
35 ifdef NSBUILDROOT
36 override NSBUILDROOT :=
37 endif
39 ifdef GNU_CC
40 MODULE_OPTIMIZE_FLAGS = -O3
41 endif
43 include $(topsrcdir)/config/config.mk
45 # Do not install util programs
46 NO_INSTALL=1
48 ifneq (WINNT,$(HOST_OS_ARCH))
49 # Ensure nsinstall is atomically created
50 nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
51 cp $^ $@.tmp
52 mv $@.tmp $@
54 NSINSTALL_FILES := nsinstall$(HOST_BIN_SUFFIX)
55 NSINSTALL_DEST := $(DIST)/bin
56 NSINSTALL_TARGET := export
57 INSTALL_TARGETS += NSINSTALL
58 endif
60 HEADERS_FILES = \
61 $(DEPTH)/mozilla-config.h \
62 $(srcdir)/nsStaticComponents.h \
63 $(NULL)
64 HEADERS_DEST := $(DIST)/include
65 HEADERS_TARGET := export
66 INSTALL_TARGETS += HEADERS
68 PYTHON_UNIT_TESTS := $(wildcard $(srcdir)/tests/unit-*.py)
70 include $(topsrcdir)/config/rules.mk
72 HOST_CFLAGS += -DUNICODE -D_UNICODE
74 ifeq ($(OS_CONFIG),SunOS4.1)
75 NSPR_CFLAGS += -I$(srcdir)/../nsprpub/pr/include/md
76 endif
78 export::
79 -$(RM) $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES)
81 # Generate a new buildid every time we "export" in config... that's only
82 # supposed to be once per-build!
83 export::
84 ifdef MOZ_BUILD_DATE
85 printf "%s" $(MOZ_BUILD_DATE) > buildid
86 else
87 $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid > buildid
88 endif
90 ifdef WRAP_SYSTEM_INCLUDES
91 export-preqs = \
92 $(call mkdir_deps,system_wrappers) \
93 $(NULL)
95 export:: $(export-preqs)
96 $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
97 -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
98 -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
99 -DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
100 -DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
101 -DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
102 -DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
103 -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
104 -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
105 -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
106 $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
107 $(INSTALL) system_wrappers $(DIST)
109 GARBAGE_DIRS += system_wrappers
110 endif
112 ifdef WRAP_STL_INCLUDES
113 ifdef GNU_CXX
114 stl_compiler = gcc
115 else
116 ifdef _MSC_VER
117 stl_compiler = msvc
118 endif
119 endif
120 endif
122 ifdef stl_compiler
123 STL_WRAPPERS_SENTINEL = $(DIST)/stl_wrappers/sentinel
125 $(STL_WRAPPERS_SENTINEL): $(srcdir)/make-stl-wrappers.py $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers $(GLOBAL_DEPS)
126 $(PYTHON) $(srcdir)/make-stl-wrappers.py stl_wrappers $(stl_compiler) $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers
127 $(PYTHON) $(srcdir)/nsinstall.py stl_wrappers $(DIST)
128 touch $(STL_WRAPPERS_SENTINEL)
130 export:: $(STL_WRAPPERS_SENTINEL)
132 GARBAGE += $(STL_WRAPPERS_SENTINEL)
133 GARBAGE_DIRS += stl_wrappers
134 endif
136 install::
137 $(SYSINSTALL) $(IFLAGS1) $(DEPTH)/mozilla-config.h $(DESTDIR)$(includedir)
139 GARBAGE += \
140 $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) buildid $(srcdir)/*.pyc *.pyc
142 ifndef CROSS_COMPILE
143 ifdef USE_ELF_DYNSTR_GC
144 elf-dynstr-gc: elf-dynstr-gc.c $(GLOBAL_DEPS) $(call mkdir_deps,$(MDDEPDIR))
145 $(CC) $(COMPILE_CFLAGS) $(GLIB_CFLAGS) -o $@ $< $(LDFLAGS) $(GLIB_LIBS)
146 endif
147 endif
149 FORCE:
151 check-preqs = \
152 check-jar-mn \
153 check-makefiles \
154 $(NULL)
156 check:: $(check-preqs)
158 check-jar-mn::
159 $(MAKE) -C tests/src-simple check-jar
160 $(MAKE) -C tests/src-simple check-flat
161 $(MAKE) -C tests/src-simple check-flat USE_EXTENSION_MANIFEST=1
162 ifneq (,$(filter-out WINNT OS2,$(OS_ARCH)))
163 $(MAKE) -C tests/src-simple check-symlink
164 endif
166 check-makefiles:
167 $(MAKE) -C tests/makefiles/autodeps check