DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
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
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEPTH		= @DEPTH@
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

VISIBILITY_FLAGS=
STL_FLAGS	=
ifdef _MSC_VER
STL_FLAGS	= -D_HAS_EXCEPTIONS=0
endif

MODULE		= mozalloc
LIBRARY_NAME	= mozalloc
DIST_INSTALL 	= 1

ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
FORCE_STATIC_LIB= 1
else
FORCE_SHARED_LIB= 1
endif

# TODO: we do this in crashreporter and storage/src too, should be centralized
ifeq ($(OS_ARCH),Linux)
DEFINES += -DXP_LINUX
endif

ifeq (,$(filter-out OS2,$(OS_ARCH)))
# The strndup declaration in string.h is in an ifdef __USE_GNU section
DEFINES		+= -D_GNU_SOURCE
endif

EXPORTS_NAMESPACES 	= mozilla
EXPORTS_mozilla 	=			\
	fallible.h				\
	mozalloc.h		 		\
	mozalloc_abort.h			\
	mozalloc_macro_wrappers.h 		\
	mozalloc_oom.h				\
	mozalloc_undef_macro_wrappers.h		\
	$(NULL)

CPPSRCS 		=			\
	mozalloc.cpp				\
	mozalloc_abort.cpp			\
	mozalloc_oom.cpp			\
	$(NULL)

ifdef WRAP_STL_INCLUDES #{
ifdef GNU_CXX #{
EXPORTS_mozilla	+= throw_gcc.h
else
ifdef _MSC_VER #{

ifeq ($(MOZ_MSVC_STL_WRAP__RAISE),1) #{
BUILD_MSVC_WRAPPERS = 1
else
ifeq ($(MOZ_MSVC_STL_WRAP__Throw),1) #{
BUILD_MSVC_WRAPPERS = 1
endif #}
endif #}

ifdef BUILD_MSVC_WRAPPERS #{
EXPORTS_mozilla		+=			\
	msvc_raise_wrappers.h			\
	msvc_throw_wrapper.h			\
	throw_msvc.h				\
	$(NULL)

CPPSRCS			+= 			\
	msvc_raise_wrappers.cpp			\
	msvc_throw_wrapper.cpp			\
	$(NULL)
endif #}

endif #}
endif #}

endif #}

ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
SDK_LIBRARY = $(IMPORT_LIBRARY)
else
SDK_LIBRARY = $(SHARED_LIBRARY)
endif

LOCAL_INCLUDES += -I$(DEPTH)/xpcom

include $(topsrcdir)/config/rules.mk