2011-06-24 17:41:16 +00:00
|
|
|
#
|
2012-05-21 11:12:37 +00: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/.
|
2011-06-24 17:41:16 +00:00
|
|
|
|
2013-02-23 00:28:08 +00:00
|
|
|
VPATH = $(srcdir) $(srcdir)/unittest
|
2011-06-24 17:41:16 +00:00
|
|
|
|
|
|
|
EXPORT_LIBRARY = 1
|
|
|
|
|
2012-05-03 19:21:52 +00:00
|
|
|
DEFINES += -DMOZ_GFX -DUSE_CAIRO -DGFX2D_INTERNAL
|
2011-06-24 17:41:16 +00:00
|
|
|
|
2013-06-11 17:40:27 +00:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gtk3 gonk qt))
|
2012-05-16 22:30:10 +00:00
|
|
|
DEFINES += -DMOZ_ENABLE_FREETYPE
|
2013-06-05 17:48:59 +00:00
|
|
|
OS_CXXFLAGS += $(CAIRO_FT_CFLAGS)
|
2012-05-16 22:30:10 +00:00
|
|
|
endif
|
|
|
|
|
2011-11-02 19:55:03 +00:00
|
|
|
DEFINES += -DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0
|
|
|
|
|
2011-06-24 17:41:16 +00:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DGFX_LOG_DEBUG -DGFX_LOG_WARNING
|
|
|
|
endif
|
|
|
|
|
2012-05-10 04:31:14 +00:00
|
|
|
# Are we targeting x86 or x64? If so, build SSE2 files.
|
|
|
|
ifneq (,$(INTEL_ARCHITECTURE))
|
2012-05-18 02:17:26 +00:00
|
|
|
# VC2005 doesn't support _mm_castsi128_ps, so SSE2 is turned off
|
|
|
|
ifneq (1400,$(_MSC_VER))
|
2012-05-10 04:31:14 +00:00
|
|
|
DEFINES += -DUSE_SSE2
|
|
|
|
endif
|
2012-05-18 02:17:26 +00:00
|
|
|
endif
|
2012-05-10 04:31:14 +00:00
|
|
|
|
2011-06-24 17:41:16 +00:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
2012-05-03 19:21:52 +00:00
|
|
|
DEFINES += -DWIN32 -DINITGUID
|
2011-12-14 13:04:32 +00:00
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_SKIA
|
2013-03-12 10:33:36 +00:00
|
|
|
DEFINES += -DSKIA_IMPLEMENTATION=1 -DGR_IMPLEMENTATION=1
|
2011-12-14 13:04:32 +00:00
|
|
|
endif
|
2013-07-17 12:12:22 +00:00
|
|
|
|
|
|
|
# For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher.
|
|
|
|
ifdef MOZ_ENABLE_DIRECT2D1_1
|
|
|
|
DEFINES += -DUSE_D2D1_1
|
|
|
|
endif
|
2011-06-24 17:41:16 +00:00
|
|
|
endif
|
|
|
|
|
2012-05-10 04:31:14 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2012-08-23 19:36:04 +00:00
|
|
|
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
|
|
|
|
|
|
|
# Due to bug 796023, we can't have -DUNICODE and -D_UNICODE; defining those
|
|
|
|
# macros changes the type of LOGFONT to LOGFONTW instead of LOGFONTA. This
|
|
|
|
# changes the symbol names of exported C++ functions that use LOGFONT.
|
|
|
|
DEFINES := $(filter-out -DUNICODE -D_UNICODE,$(DEFINES))
|
2012-05-10 04:31:14 +00:00
|
|
|
|
|
|
|
# The file uses SSE2 intrinsics, so it needs special compile flags on some
|
|
|
|
# compilers.
|
|
|
|
ifneq (,$(INTEL_ARCHITECTURE))
|
|
|
|
ifdef GNU_CC
|
|
|
|
ImageScalingSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
|
2012-11-07 08:29:54 +00:00
|
|
|
BlurSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
|
2012-05-10 04:31:14 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SOLARIS_SUNPRO_CXX
|
|
|
|
ImageScalingSSE2.$(OBJ_SUFFIX): OS_CXXFLAGS += -xarch=sse2 -xO4
|
2012-11-07 08:29:54 +00:00
|
|
|
BlurSSE2.$(OBJ_SUFFIX): OS_CXXFLAGS += -xarch=sse2 -xO4
|
2012-05-10 04:31:14 +00:00
|
|
|
endif
|
|
|
|
endif
|
2012-05-08 02:40:13 +00:00
|
|
|
|
2012-05-26 06:44:00 +00:00
|
|
|
CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS)
|