2012-08-04 11:26:44 -07:00
|
|
|
DEPTH = @DEPTH@
|
2010-04-18 18:17:06 -07:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
LIBRARY_NAME = ycbcr
|
|
|
|
LIBXUL_LIBRARY = 1
|
|
|
|
EXPORT_LIBRARY = 1
|
|
|
|
|
|
|
|
DEFINES += -D_IMPL_NS_GFX
|
|
|
|
|
|
|
|
CPPSRCS = yuv_convert.cpp \
|
|
|
|
yuv_row_c.cpp \
|
2010-11-10 15:54:27 -08:00
|
|
|
yuv_row_table.cpp \
|
2011-01-19 09:38:38 -08:00
|
|
|
ycbcr_to_rgb565.cpp \
|
2010-04-18 18:17:06 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2010-12-09 09:59:21 -08:00
|
|
|
# Are we targeting x86 or x64? If so, build yuv_convert_mmx.cpp and
|
2011-08-28 22:34:02 -07:00
|
|
|
# yuv_convert_sse2.cpp.
|
2010-12-09 09:59:21 -08:00
|
|
|
ifneq (,$(INTEL_ARCHITECTURE))
|
2011-01-17 21:08:47 -08:00
|
|
|
CPPSRCS += yuv_convert_sse2.cpp
|
|
|
|
|
|
|
|
# MSVC doesn't support MMX when targeting AMD64.
|
|
|
|
ifdef _MSC_VER
|
|
|
|
ifneq ($(OS_TEST),x86_64)
|
|
|
|
CPPSRCS += yuv_convert_mmx.cpp
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
CPPSRCS += yuv_convert_mmx.cpp
|
|
|
|
endif
|
2010-12-09 09:59:21 -08:00
|
|
|
endif
|
|
|
|
|
2010-04-29 01:35:07 -07:00
|
|
|
ifdef _MSC_VER
|
2011-04-17 17:51:18 -07:00
|
|
|
ifeq ($(OS_TEST),x86_64)
|
2011-05-08 08:07:58 -07:00
|
|
|
ifeq (1400,$(_MSC_VER))
|
|
|
|
# VC8 doesn't support some SSE2 built-in functions
|
|
|
|
CPPSRCS += yuv_row_win.cpp \
|
|
|
|
$(NULL)
|
|
|
|
else
|
2011-04-17 17:51:18 -07:00
|
|
|
CPPSRCS += yuv_row_win64.cpp \
|
|
|
|
$(NULL)
|
2011-05-08 08:07:58 -07:00
|
|
|
endif
|
2011-04-17 17:51:18 -07:00
|
|
|
else
|
2010-04-18 18:17:06 -07:00
|
|
|
CPPSRCS += yuv_row_win.cpp \
|
|
|
|
$(NULL)
|
2011-04-17 17:51:18 -07:00
|
|
|
endif
|
2010-04-18 18:17:06 -07:00
|
|
|
else
|
2012-08-03 06:04:39 -07:00
|
|
|
ifneq (,$(filter Linux SunOS Darwin DragonFly FreeBSD NetBSD OpenBSD, $(OS_ARCH)))
|
2010-11-10 15:54:27 -08:00
|
|
|
CPPSRCS += yuv_row_posix.cpp \
|
2010-06-21 12:18:13 -07:00
|
|
|
$(NULL)
|
|
|
|
else
|
2010-04-18 18:17:06 -07:00
|
|
|
CPPSRCS += yuv_row_other.cpp \
|
|
|
|
$(NULL)
|
2012-08-03 06:04:39 -07:00
|
|
|
endif # posix
|
2010-05-02 05:20:40 -07:00
|
|
|
endif # windows
|
2010-04-18 18:17:06 -07:00
|
|
|
|
2010-12-10 11:32:52 -08:00
|
|
|
ifeq (arm,$(findstring arm,$(OS_TEST)))
|
2011-04-14 17:34:18 -07:00
|
|
|
ifdef HAVE_ARM_NEON
|
2010-12-10 11:32:52 -08:00
|
|
|
CPPSRCS += yuv_convert_arm.cpp \
|
|
|
|
$(NULL)
|
2011-04-14 17:34:18 -07:00
|
|
|
ASFILES = yuv_row_arm.$(ASM_SUFFIX) \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2010-12-10 11:32:52 -08:00
|
|
|
endif
|
|
|
|
|
2010-04-18 18:17:06 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2011-08-28 22:34:02 -07:00
|
|
|
|
|
|
|
# These files use MMX and SSE2 intrinsics, so they need special compile flags
|
|
|
|
# on some compilers.
|
|
|
|
ifneq (,$(INTEL_ARCHITECTURE))
|
|
|
|
ifdef GNU_CC
|
|
|
|
yuv_convert_mmx.$(OBJ_SUFFIX): CXXFLAGS += -mmmx
|
|
|
|
yuv_convert_sse2.$(OBJ_SUFFIX): CXXFLAGS += -msse2
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SOLARIS_SUNPRO_CXX
|
|
|
|
yuv_convert_mmx.$(OBJ_SUFFIX): CXXFLAGS += -xarch=mmx -xO4
|
|
|
|
yuv_convert_sse2.$(OBJ_SUFFIX): CXXFLAGS += -xarch=sse2 -xO4
|
|
|
|
endif
|
|
|
|
endif
|