1
# vim:set ts=8 sw=8 sts=8 noet:
2
# This Source Code Form is subject to the terms of the Mozilla Public
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
topsrcdir = @top_srcdir@
10
relativesrcdir = @relativesrcdir@
12
include $(DEPTH)/config/autoconf.mk
14
MODULE = crashreporter
16
# Don't use the STL wrappers in the crashreporter clients; they don't
17
# link with -lmozalloc, and it really doesn't matter here anyway.
20
ifneq ($(OS_TARGET),Android)
21
PROGRAM = crashreporter$(BIN_SUFFIX)
22
DIST_PROGRAM = crashreporter$(BIN_SUFFIX)
24
# Don't link the updater against libmozglue.
26
MOZ_GLUE_PROGRAM_LDFLAGS =
29
LOCAL_INCLUDES = -I$(srcdir)/../google-breakpad/src
31
VPATH += $(topsrcdir)/build/
37
ifeq ($(OS_ARCH),WINNT)
38
CPPSRCS += crashreporter_win.cpp
40
$(DEPTH)/toolkit/crashreporter/breakpad-windows-libxul/$(LIB_PREFIX)google_breakpad_libxul_s.$(LIB_SUFFIX)
42
LOCAL_INCLUDES += -I$(srcdir)
43
RCINCLUDE = crashreporter.rc
44
DEFINES += -DUNICODE -D_UNICODE
45
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 shell32 wininet shlwapi)
49
ifeq ($(OS_ARCH),Darwin)
50
CPPSRCS += crashreporter_unix_common.cpp
51
CMMSRCS += crashreporter_osx.mm
52
OS_LIBS += -framework Cocoa
54
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
55
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/mac/$(LIB_PREFIX)breakpad_mac_common_s.$(LIB_SUFFIX) \
58
LOCAL_INCLUDES += -I$(srcdir) -I$(srcdir)/../google-breakpad/src/common/mac/
61
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
62
CPPSRCS += crashreporter_gtk_common.cpp crashreporter_unix_common.cpp
64
ifdef MOZ_PLATFORM_MAEMO
65
CPPSRCS += crashreporter_maemo_gtk.cpp
67
# Maemo's libcurl doesn't ship with a set of CA certificates,
68
# so we have to ship our own.
69
libs:: $(DIST)/bin/crashreporter.crt
71
$(DIST)/bin/crashreporter.crt: $(topsrcdir)/security/nss/lib/ckfw/builtins/certdata.txt certdata2pem.py
72
$(PYTHON) $(srcdir)/certdata2pem.py < $< > $@
74
# The xpcshell test case here verifies that the CA certificate list
76
XPCSHELL_TESTS = maemo-unit
79
CPPSRCS += crashreporter_linux.cpp
83
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \
85
LOCAL_INCLUDES += -I$(srcdir)
86
OS_CXXFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
87
OS_LIBS += $(MOZ_GTK2_LIBS) $(MOZ_GTHREAD_LIBS)
90
ifeq ($(OS_ARCH),SunOS)
91
CPPSRCS += crashreporter_linux.cpp crashreporter_unix.cpp
93
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/solaris/$(LIB_PREFIX)breakpad_solaris_common_s.$(LIB_SUFFIX) \
95
LOCAL_INCLUDES += -I$(srcdir)
96
OS_CXXFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
97
OS_LIBS += $(MOZ_GTK2_LIBS) $(MOZ_GTHREAD_LIBS)
100
include $(topsrcdir)/config/rules.mk
102
ifeq ($(OS_ARCH),Darwin)
104
$(NSINSTALL) -D $(DIST)/bin/crashreporter.app
105
rsync -a -C --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/bin/crashreporter.app
106
sed -e "s/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
107
iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/crashreporter.app/Contents/Resources/English.lproj/InfoPlist.strings
108
$(NSINSTALL) -D $(DIST)/bin/crashreporter.app/Contents/MacOS
109
$(NSINSTALL) $(DIST)/bin/crashreporter $(DIST)/bin/crashreporter.app/Contents/MacOS
110
rm -f $(DIST)/bin/crashreporter
113
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
114
libs:: $(topsrcdir)/toolkit/themes/winstripe/global/throbber/Throbber-small.gif
115
$(INSTALL) $^ $(DIST)/bin
118
ifdef MOZ_PLATFORM_MAEMO
120
$(INSTALL) $(DIST)/bin/crashreporter.crt $(DEPTH)/_tests/xpcshell/$(MODULE)/maemo-unit/