1 # $NetBSD: Makefile,v 1.27 2014/01/30 19:24:06 riz Exp $ 2 3 NOLINT= 1 # defined 4 5 .include <bsd.own.mk> 6 7 LIB= pixman-1 8 9 DIST= ${X11SRCDIR.pixman}/pixman 10 .PATH: ${DIST} 11 12 SRCS= \ 13 pixman.c \ 14 pixman-access.c \ 15 pixman-access-accessors.c \ 16 pixman-bits-image.c \ 17 pixman-combine32.c \ 18 pixman-combine-float.c \ 19 pixman-conical-gradient.c \ 20 pixman-edge.c \ 21 pixman-edge-accessors.c \ 22 pixman-fast-path.c \ 23 pixman-filter.c \ 24 pixman-glyph.c \ 25 pixman-general.c \ 26 pixman-gradient-walker.c \ 27 pixman-image.c \ 28 pixman-implementation.c \ 29 pixman-linear-gradient.c \ 30 pixman-matrix.c \ 31 pixman-noop.c \ 32 pixman-radial-gradient.c \ 33 pixman-region16.c \ 34 pixman-region32.c \ 35 pixman-solid-fill.c \ 36 pixman-timer.c \ 37 pixman-trap.c \ 38 pixman-utils.c 39 40 SRCS+= \ 41 pixman-x86.c \ 42 pixman-mips.c \ 43 pixman-arm.c \ 44 pixman-ppc.c \ 45 46 # XXX 47 48 .if ${MACHINE_ARCH} == "i386" 49 SRCS+= pixman-mmx.c 50 COPTS.pixman-mmx.c= -mmmx -fvisibility=hidden 51 . if defined(HAVE_LLVM) 52 COPTS.pixman-mmx.c+= -Wno-error=attributes 53 . endif 54 MKDEPFLAGS+= -mmmx -msse2 -fvisibility=hidden 55 SRCS+= pixman-sse2.c 56 COPTS.pixman-sse2.c= -msse2 -fvisibility=hidden 57 CPPFLAGS+= -DUSE_SSE2 -DUSE_X86_MMX 58 .elif ${MACHINE_ARCH} == "x86_64" 59 SRCS+= pixman-sse2.c 60 COPTS.pixman-sse2.c= -msse2 -fvisibility=hidden 61 CPPFLAGS+= -DUSE_SSE2 62 .endif 63 64 .if ${MACHINE_ARCH} == "powerpc" 65 SRCS+= pixman-vmx.c 66 COPTS.pixman-vmx.c= -maltivec 67 CPPFLAGS+= -DUSE_VMX 68 MKDEPFLAGS+= -maltivec 69 .endif 70 71 72 .if !empty(MACHINE_ARCH:Mearm*) 73 # ARM SIMD 74 SRCS+= pixman-arm-simd.c \ 75 pixman-arm-simd-asm.S \ 76 pixman-arm-simd-asm-scaled.S 77 CPPFLAGS+= -DUSE_ARM_SIMD 78 # ARM NEON 79 SRCS+= pixman-arm-neon.c \ 80 pixman-arm-neon-asm.S \ 81 pixman-arm-neon-asm-bilinear.S 82 CPPFLAGS+= -DUSE_ARM_NEON 83 # ARM iwMMX 84 #SRCS+= pixman-mmx.c 85 #COPTS.pixman-mmx.c= -mcpu=iwmmxt 86 #CPPFLAGS+= -DUSE_ARM_IWMMXT 87 .endif 88 89 .if ${MACHINE} == "evbmips" 90 # Loongson MMI 91 SRCS+= pixman-mmx.c 92 CPPFLAGS+= -DUSE_LOONGSON_MMI 93 # SIMD instructions use floatpoint registers so we need to enable their use 94 COPTS.pixman-mmx.c= -march=loongson2f -mhard-float 95 .endif 96 97 INCS= pixman.h pixman-version.h 98 INCSDIR=${X11INCDIR}/pixman-1 99 100 CPPFLAGS+= -DHAVE_CONFIG_H \ 101 -I${X11SRCDIR.pixman}/../include \ 102 -I${X11SRCDIR.pixman}/../combine \ 103 -I${X11SRCDIR.pixman}/pixman 104 105 # With pixman 0.28.3, HAVE_PTHREAD_SETSPECIFIC is much faster than TLS 106 CPPFLAGS+= -DHAVE_PTHREAD_SETSPECIFIC 107 #CPPFLAGS+= -DTLS=__thread 108 109 LIBDPLIBS= m ${.CURDIR}/../../../../../lib/libm 110 111 PKGCONFIG= pixman-1 112 PKGDIST= pixman 113 114 .include <bsd.x11.mk> 115 .include <bsd.lib.mk> 116