michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: EXPORTS += [ michael@0: 'qcms.h', michael@0: 'qcmstypes.h', michael@0: ] michael@0: michael@0: SOURCES += [ michael@0: 'chain.c', michael@0: 'iccread.c', michael@0: 'matrix.c', michael@0: 'transform.c', michael@0: 'transform_util.c', michael@0: ] michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: FINAL_LIBRARY = 'gkmedias' michael@0: michael@0: if CONFIG['GNU_CC']: michael@0: CFLAGS += ['-Wno-missing-field-initializers'] michael@0: michael@0: use_sse1 = False michael@0: use_sse2 = False michael@0: use_altivec = False michael@0: if '86' in CONFIG['OS_TEST']: michael@0: use_sse2 = True michael@0: if CONFIG['_MSC_VER']: michael@0: if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64': michael@0: use_sse1 = True michael@0: else: michael@0: use_sse1 = True michael@0: elif 'ppc' in CONFIG['CPU_ARCH']: michael@0: if CONFIG['GNU_CC']: michael@0: use_altivec = True michael@0: michael@0: if use_sse1: michael@0: SOURCES += ['transform-sse1.c'] michael@0: SOURCES['transform-sse1.c'].flags += CONFIG['SSE_FLAGS'] michael@0: if CONFIG['SOLARIS_SUNPRO_CC']: michael@0: if '64' in CONFIG['OS_TEST']: michael@0: # Sun Studio doesn't work correctly for x86 intristics michael@0: # with -m64 and without optimization. michael@0: SOURCES['transform-sse1.c'].flags += ['-xO4'] michael@0: else: michael@0: SOURCES['transform-sse1.c'].flags += ['-xarch=sse'] michael@0: michael@0: if use_sse2: michael@0: SOURCES += ['transform-sse2.c'] michael@0: SOURCES['transform-sse2.c'].flags += CONFIG['SSE2_FLAGS'] michael@0: if CONFIG['SOLARIS_SUNPRO_CC']: michael@0: if '64' in CONFIG['OS_TEST']: michael@0: # Sun Studio doesn't work correctly for x86 intristics michael@0: # with -m64 and without optimization. michael@0: SOURCES['transform-sse2.c'].flags += ['-xO4'] michael@0: else: michael@0: SOURCES['transform-sse2.c'].flags += ['-xarch=sse2'] michael@0: michael@0: if use_altivec: michael@0: SOURCES += ['transform-altivec.c'] michael@0: SOURCES['transform-altivec.c'].flags += ['-maltivec']