1 # $NetBSD: Makefile,v 1.40 2022/11/12 07:43:33 mrg 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 # missing: HAVE_GCC_VECTOR_EXTENSIONS 49 50 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 51 . if ${MACHINE_ARCH} == "i386" 52 SRCS+= pixman-mmx.c 53 COPTS.pixman-mmx.c= -mmmx -fvisibility=hidden 54 . if defined(HAVE_LLVM) 55 COPTS.pixman-mmx.c+= -Wno-error=attributes 56 . endif 57 CPPFLAGS+= -DUSE_X86_MMX 58 MKDEPFLAGS+= -mmmx 59 . endif 60 SRCS+= pixman-sse2.c pixman-ssse3.c 61 COPTS.pixman-sse2.c= -msse2 -fvisibility=hidden 62 COPTS.pixman-ssse3.c= -msse3 -mssse3 -fvisibility=hidden 63 CPPFLAGS+= -DUSE_SSE2 -DUSE_SSSE3 64 MKDEPFLAGS+= -msse2 -msse3 -mssse3 -fvisibility=hidden 65 .endif 66 67 .if ${MACHINE_ARCH} == "powerpc" 68 SRCS+= pixman-vmx.c 69 COPTS.pixman-vmx.c= -maltivec 70 CPPFLAGS+= -DUSE_VMX 71 MKDEPFLAGS+= -maltivec 72 .endif 73 74 .if !empty(MACHINE_ARCH:Mearm*) 75 # ARM SIMD 76 SRCS+= pixman-arm-simd.c \ 77 pixman-arm-simd-asm.S \ 78 pixman-arm-simd-asm-scaled.S 79 CPPFLAGS+= -DUSE_ARM_SIMD 80 # ARM NEON 81 SRCS+= pixman-arm-neon.c \ 82 pixman-arm-neon-asm.S \ 83 pixman-arm-neon-asm-bilinear.S 84 CPPFLAGS+= -DUSE_ARM_NEON 85 86 AFLAGS+= ${${ACTIVE_CC} == "clang" :? -fno-integrated-as :} 87 # ARM iwMMX 88 #SRCS+= pixman-mmx.c 89 #COPTS.pixman-mmx.c= -mcpu=iwmmxt 90 #CPPFLAGS+= -DUSE_ARM_IWMMXT 91 .endif 92 93 .if !empty(MACHINE_ARCH:Maarch64*) && 0 94 # ARM64 NEON 95 SRCS+= pixman-arm-neon.c \ 96 pixman-arma64-neon-asm.S \ 97 pixman-arma64-neon-asm-bilinear.S 98 CPPFLAGS+= -DUSE_ARM_A64_NEON 99 100 # XXX: not sure if needed? 101 #AFLAGS+= ${${ACTIVE_CC} == "clang" :? -fno-integrated-as :} 102 .endif 103 104 .if !empty(MACHINE_ARCH:Mmips*64el) && empty(COPTS:M-march=*) 105 # Loongson MMI 106 SRCS+= pixman-mmx.c 107 CPPFLAGS+= -DUSE_LOONGSON_MMI 108 # SIMD instructions use floatpoint registers so we need to enable their use 109 COPTS.pixman-mmx.c= -march=loongson2f -mhard-float -Wa,-mhard-float 110 .endif 111 112 .if ${MACHINE_CPU} == "sh3" 113 # XXX pixman-fast-path.c:1204:1: internal compiler error: Segmentation fault 114 COPTS.pixman-fast-path.c+= -O1 115 .endif 116 117 INCS= pixman.h pixman-version.h 118 INCSDIR=${X11INCDIR}/pixman-1 119 120 CPPFLAGS+= -DHAVE_CONFIG_H \ 121 -I${X11SRCDIR.pixman}/../include \ 122 -I${X11SRCDIR.pixman}/../combine \ 123 -I${X11SRCDIR.pixman}/pixman 124 125 # With pixman 0.28.3, HAVE_PTHREAD_SETSPECIFIC is much faster than TLS 126 CPPFLAGS+= -DHAVE_PTHREAD_SETSPECIFIC 127 #CPPFLAGS+= -DTLS=__thread 128 129 LIBDPLIBS= m ${.CURDIR}/../../../../../lib/libm 130 131 PKGCONFIG= pixman-1 132 PKGDIST= pixman 133 134 .include <bsd.x11.mk> 135 .include <bsd.lib.mk> 136