2010-03-03 21:02:56 -08:00
|
|
|
#
|
2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
2010-03-03 21:02:56 -08:00
|
|
|
|
2012-08-04 11:26:44 -07:00
|
|
|
DEPTH = @DEPTH@
|
2010-03-03 21:02:56 -08:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
VISIBILITY_FLAGS=
|
2010-04-20 13:12:02 -07:00
|
|
|
STL_FLAGS =
|
|
|
|
ifdef _MSC_VER
|
|
|
|
STL_FLAGS = -D_HAS_EXCEPTIONS=0
|
|
|
|
endif
|
2010-03-03 21:02:56 -08:00
|
|
|
|
|
|
|
MODULE = mozalloc
|
|
|
|
LIBRARY_NAME = mozalloc
|
|
|
|
DIST_INSTALL = 1
|
|
|
|
|
2011-11-10 16:17:46 -08:00
|
|
|
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
FORCE_STATIC_LIB= 1
|
|
|
|
else
|
|
|
|
FORCE_SHARED_LIB= 1
|
|
|
|
endif
|
|
|
|
|
2011-12-08 19:09:36 -08:00
|
|
|
# TODO: we do this in crashreporter and storage/src too, should be centralized
|
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
|
|
DEFINES += -DXP_LINUX
|
|
|
|
endif
|
|
|
|
|
2010-03-06 09:58:04 -08:00
|
|
|
ifeq (,$(filter-out OS2,$(OS_ARCH)))
|
|
|
|
# The strndup declaration in string.h is in an ifdef __USE_GNU section
|
|
|
|
DEFINES += -D_GNU_SOURCE
|
|
|
|
endif
|
|
|
|
|
2010-03-03 21:02:56 -08:00
|
|
|
EXPORTS_NAMESPACES = mozilla
|
2010-04-20 13:12:02 -07:00
|
|
|
EXPORTS_mozilla = \
|
2012-05-08 09:30:37 -07:00
|
|
|
fallible.h \
|
2010-04-20 13:12:02 -07:00
|
|
|
mozalloc.h \
|
|
|
|
mozalloc_abort.h \
|
|
|
|
mozalloc_macro_wrappers.h \
|
|
|
|
mozalloc_oom.h \
|
2010-06-04 16:16:34 -07:00
|
|
|
mozalloc_undef_macro_wrappers.h \
|
2010-04-20 13:12:02 -07:00
|
|
|
$(NULL)
|
2010-03-03 21:02:56 -08:00
|
|
|
|
2010-04-20 13:12:02 -07:00
|
|
|
CPPSRCS = \
|
2010-03-03 21:02:56 -08:00
|
|
|
mozalloc.cpp \
|
2010-04-20 13:12:02 -07:00
|
|
|
mozalloc_abort.cpp \
|
2010-03-03 21:02:56 -08:00
|
|
|
mozalloc_oom.cpp \
|
|
|
|
$(NULL)
|
|
|
|
|
2010-04-28 17:38:41 -07:00
|
|
|
ifdef WRAP_STL_INCLUDES #{
|
2010-05-01 02:46:25 -07:00
|
|
|
ifdef GNU_CXX #{
|
2010-04-20 13:12:02 -07:00
|
|
|
EXPORTS_mozilla += throw_gcc.h
|
2010-04-28 17:38:41 -07:00
|
|
|
else
|
|
|
|
ifdef _MSC_VER #{
|
2011-08-31 11:05:20 -07:00
|
|
|
|
|
|
|
ifeq ($(MOZ_MSVC_STL_WRAP__RAISE),1) #{
|
|
|
|
BUILD_MSVC_WRAPPERS = 1
|
2010-04-28 17:38:41 -07:00
|
|
|
else
|
2011-08-31 11:05:20 -07:00
|
|
|
ifeq ($(MOZ_MSVC_STL_WRAP__Throw),1) #{
|
|
|
|
BUILD_MSVC_WRAPPERS = 1
|
2010-04-28 17:38:41 -07:00
|
|
|
endif #}
|
|
|
|
endif #}
|
2011-08-31 11:05:20 -07:00
|
|
|
|
|
|
|
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 #}
|
|
|
|
|
2010-04-28 17:38:41 -07:00
|
|
|
endif #}
|
|
|
|
endif #}
|
2011-08-31 11:05:20 -07:00
|
|
|
|
2010-04-28 17:38:41 -07:00
|
|
|
endif #}
|
2010-04-20 13:12:02 -07:00
|
|
|
|
2011-05-08 01:29:59 -07:00
|
|
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
2010-08-05 11:53:43 -07:00
|
|
|
SDK_LIBRARY = $(IMPORT_LIBRARY)
|
|
|
|
else
|
|
|
|
SDK_LIBRARY = $(SHARED_LIBRARY)
|
|
|
|
endif
|
|
|
|
|
2011-06-06 18:09:46 -07:00
|
|
|
LOCAL_INCLUDES += -I$(DEPTH)/xpcom
|
|
|
|
|
2010-03-03 21:02:56 -08:00
|
|
|
include $(topsrcdir)/config/rules.mk
|