gfx/cairo/cairo/src/Makefile.in
author Phil Ringnalda <philringnalda@gmail.com>
Tue, 03 Sep 2013 21:55:21 -0700
changeset 153398 49c8cb0df3378b6301db79b632ca145429148ec6
parent 153394 cc6f66e761d86fc1f4b89e08eb8413fd95b56110
child 153401 ae9f95fc113658570613ede2924602f81d38ed69
permissions -rw-r--r--
Back out cc6f66e761d8 (bug 896797) for Windows build bustage CLOSED TREE

# 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

ifdef GNU_CC
ifeq ($(OS_TARGET),Android)
MODULE_OPTIMIZE_FLAGS = -O2
endif
endif


ifneq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CSRCS += cairo-deflate-stream.c
endif

# cairo-type1-subset.c should be here, but it's only supported on freetype platforms

PSPDF_BASE_CSRCS = \
	cairo-base85-stream.c \
	cairo-type1-fallback.c \
	cairo-type3-glyph-surface.c \
	cairo-truetype-subset.c \
	cairo-cff-subset.c \
	$(NULL)

PDF_CSRCS = \
	cairo-pdf-surface.c \
	cairo-pdf-operators.c \
	$(NULL)

PS_CSRCS = cairo-ps-surface.c

ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
DEFINES += -DDISABLE_SOME_FLOATING_POINT
CSRCS	+=	cairo-win32-surface.c

CSRCS	+=	cairo-win32-font.c

ifdef NS_PRINTING
CSRCS   += cairo-win32-printing-surface.c
else
DEFINES += -DCAIRO_OMIT_WIN32_PRINTING
endif

CSRCS   += $(PSPDF_BASE_CSRCS) $(PDF_CSRCS)
endif

ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
DEFINES += -DOS2_USE_PLATFORM_ALLOC
ifdef MOZ_OS2_HIGH_MEMORY
DEFINES += -DOS2_HIGH_MEMORY
endif
CSRCS   += cairo-os2-surface.c
CSRCS   += $(PSPDF_BASE_CSRCS) $(PDF_CSRCS)
endif

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
CSRCS   += cairo-quartz-surface.c cairo-quartz-image-surface.c cairo-quartz-font.c
endif

ifdef MOZ_WIDGET_GTK
CSRCS   += $(PSPDF_BASE_CSRCS) $(PDF_CSRCS) $(PS_CSRCS)
endif

ifneq (,$(filter android gonk,$(MOZ_WIDGET_TOOLKIT)))
CSRCS   += $(PSPDF_BASE_CSRCS) $(PDF_CSRCS)
endif

ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
CSRCS   += $(PSPDF_BASE_CSRCS) $(PDF_CSRCS) 
OS_INCLUDES += $(MOZ_QT_CFLAGS)
endif

ifdef MOZ_X11
CSRCS   += cairo-xlib-surface.c \
	   cairo-xlib-screen.c \
	   cairo-xlib-visual.c \
	   cairo-xlib-display.c
OS_INCLUDES += $(XCFLAGS)
endif

ifdef MOZ_ENABLE_CAIRO_FT
CSRCS   += cairo-ft-font.c cairo-type1-subset.c
OS_INCLUDES += $(CAIRO_FT_CFLAGS)
endif

LOCAL_INCLUDES  += -I$(srcdir)

include $(topsrcdir)/config/rules.mk

ifdef GNU_CC
# Disable spammy "missing initializer" GCC warning
CFLAGS += -Wno-missing-field-initializers

# Disable spammy "implicit conversion from enumeration type 'cairo_" warnings.
CFLAGS += -Wno-conversion
endif # GNU_CC

DEFINES += -DPACKAGE_VERSION="\"moz\"" -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""

DEFINES += -DCAIRO_HAS_PTHREAD -D_GNU_SOURCE

ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
DEFINES += -DCAIRO_WIN32_STATIC_BUILD
endif

ifdef MOZ_TREE_CAIRO
DEFINES += -DMOZ_TREE_CAIRO
endif

ifndef MOZ_TREE_PIXMAN
CFLAGS += $(MOZ_PIXMAN_CFLAGS)
CXXFLAGS += $(MOZ_PIXMAN_CFLAGS)
else
DEFINES += -DMOZ_TREE_PIXMAN
endif

ifdef MOZ_TREE_FREETYPE
DEFINES += -DHAVE_FT_LIBRARY_SETLCDFILTER -DFT_LCD_FILTER_H="$(topsrcdir)/modules/freetype2/include/freetype/ftlcdfil.h"
endif