1 1.39 mrg # $NetBSD: Makefile,v 1.39 2022/11/12 04:00:57 mrg Exp $ 2 1.2 rtr 3 1.2 rtr NOLINT= 1 # defined 4 1.1 mrg 5 1.1 mrg .include <bsd.own.mk> 6 1.1 mrg 7 1.1 mrg LIB= pixman-1 8 1.1 mrg 9 1.1 mrg DIST= ${X11SRCDIR.pixman}/pixman 10 1.6 veego .PATH: ${DIST} 11 1.1 mrg 12 1.15 jmcneill SRCS= \ 13 1.15 jmcneill pixman.c \ 14 1.15 jmcneill pixman-access.c \ 15 1.15 jmcneill pixman-access-accessors.c \ 16 1.15 jmcneill pixman-bits-image.c \ 17 1.15 jmcneill pixman-combine32.c \ 18 1.15 jmcneill pixman-combine-float.c \ 19 1.15 jmcneill pixman-conical-gradient.c \ 20 1.15 jmcneill pixman-edge.c \ 21 1.15 jmcneill pixman-edge-accessors.c \ 22 1.15 jmcneill pixman-fast-path.c \ 23 1.24 mrg pixman-filter.c \ 24 1.15 jmcneill pixman-glyph.c \ 25 1.15 jmcneill pixman-general.c \ 26 1.15 jmcneill pixman-gradient-walker.c \ 27 1.15 jmcneill pixman-image.c \ 28 1.15 jmcneill pixman-implementation.c \ 29 1.15 jmcneill pixman-linear-gradient.c \ 30 1.15 jmcneill pixman-matrix.c \ 31 1.15 jmcneill pixman-noop.c \ 32 1.15 jmcneill pixman-radial-gradient.c \ 33 1.15 jmcneill pixman-region16.c \ 34 1.15 jmcneill pixman-region32.c \ 35 1.15 jmcneill pixman-solid-fill.c \ 36 1.15 jmcneill pixman-timer.c \ 37 1.15 jmcneill pixman-trap.c \ 38 1.15 jmcneill pixman-utils.c 39 1.1 mrg 40 1.24 mrg SRCS+= \ 41 1.24 mrg pixman-x86.c \ 42 1.24 mrg pixman-mips.c \ 43 1.24 mrg pixman-arm.c \ 44 1.33 szptvlfn pixman-ppc.c 45 1.24 mrg 46 1.1 mrg # XXX 47 1.1 mrg 48 1.29 mrg # missing: HAVE_GCC_VECTOR_EXTENSIONS 49 1.29 mrg 50 1.28 mrg .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 51 1.28 mrg . if ${MACHINE_ARCH} == "i386" 52 1.10 mrg SRCS+= pixman-mmx.c 53 1.10 mrg COPTS.pixman-mmx.c= -mmmx -fvisibility=hidden 54 1.28 mrg . if defined(HAVE_LLVM) 55 1.27 riz COPTS.pixman-mmx.c+= -Wno-error=attributes 56 1.28 mrg . endif 57 1.28 mrg CPPFLAGS+= -DUSE_X86_MMX 58 1.28 mrg MKDEPFLAGS+= -mmmx 59 1.27 riz . endif 60 1.28 mrg SRCS+= pixman-sse2.c pixman-ssse3.c 61 1.23 martin COPTS.pixman-sse2.c= -msse2 -fvisibility=hidden 62 1.28 mrg COPTS.pixman-ssse3.c= -msse3 -mssse3 -fvisibility=hidden 63 1.30 jmcneill CPPFLAGS+= -DUSE_SSE2 -DUSE_SSSE3 64 1.34 szptvlfn MKDEPFLAGS+= -msse2 -msse3 -mssse3 -fvisibility=hidden 65 1.3 mrg .endif 66 1.1 mrg 67 1.19 macallan .if ${MACHINE_ARCH} == "powerpc" 68 1.19 macallan SRCS+= pixman-vmx.c 69 1.19 macallan COPTS.pixman-vmx.c= -maltivec 70 1.19 macallan CPPFLAGS+= -DUSE_VMX 71 1.19 macallan MKDEPFLAGS+= -maltivec 72 1.19 macallan .endif 73 1.19 macallan 74 1.26 skrll .if !empty(MACHINE_ARCH:Mearm*) 75 1.15 jmcneill # ARM SIMD 76 1.26 skrll SRCS+= pixman-arm-simd.c \ 77 1.26 skrll pixman-arm-simd-asm.S \ 78 1.26 skrll pixman-arm-simd-asm-scaled.S 79 1.26 skrll CPPFLAGS+= -DUSE_ARM_SIMD 80 1.15 jmcneill # ARM NEON 81 1.15 jmcneill SRCS+= pixman-arm-neon.c \ 82 1.15 jmcneill pixman-arm-neon-asm.S \ 83 1.15 jmcneill pixman-arm-neon-asm-bilinear.S 84 1.15 jmcneill CPPFLAGS+= -DUSE_ARM_NEON 85 1.31 joerg 86 1.31 joerg AFLAGS+= ${${ACTIVE_CC} == "clang" :? -fno-integrated-as :} 87 1.15 jmcneill # ARM iwMMX 88 1.22 skrll #SRCS+= pixman-mmx.c 89 1.22 skrll #COPTS.pixman-mmx.c= -mcpu=iwmmxt 90 1.22 skrll #CPPFLAGS+= -DUSE_ARM_IWMMXT 91 1.15 jmcneill .endif 92 1.15 jmcneill 93 1.39 mrg .if !empty(MACHINE_ARCH:Maarch64*) 94 1.39 mrg # ARM64 NEON 95 1.39 mrg SRCS+= pixman-arm-neon.c \ 96 1.39 mrg pixman-arma64-neon-asm.S \ 97 1.39 mrg pixman-arma64-neon-asm-bilinear.S 98 1.39 mrg CPPFLAGS+= -DUSE_ARM_A64_NEON 99 1.39 mrg 100 1.39 mrg # XXX: not sure if needed? 101 1.39 mrg #AFLAGS+= ${${ACTIVE_CC} == "clang" :? -fno-integrated-as :} 102 1.39 mrg .endif 103 1.39 mrg 104 1.38 christos .if !empty(MACHINE_ARCH:Mmips*64el) && empty(COPTS:M-march=*) 105 1.21 macallan # Loongson MMI 106 1.21 macallan SRCS+= pixman-mmx.c 107 1.21 macallan CPPFLAGS+= -DUSE_LOONGSON_MMI 108 1.21 macallan # SIMD instructions use floatpoint registers so we need to enable their use 109 1.35 macallan COPTS.pixman-mmx.c= -march=loongson2f -mhard-float -Wa,-mhard-float 110 1.21 macallan .endif 111 1.21 macallan 112 1.36 mrg .if ${MACHINE_CPU} == "sh3" 113 1.36 mrg # XXX pixman-fast-path.c:1204:1: internal compiler error: Segmentation fault 114 1.36 mrg COPTS.pixman-fast-path.c+= -O1 115 1.36 mrg .endif 116 1.36 mrg 117 1.1 mrg INCS= pixman.h pixman-version.h 118 1.1 mrg INCSDIR=${X11INCDIR}/pixman-1 119 1.1 mrg 120 1.11 mrg CPPFLAGS+= -DHAVE_CONFIG_H \ 121 1.1 mrg -I${X11SRCDIR.pixman}/../include \ 122 1.1 mrg -I${X11SRCDIR.pixman}/../combine \ 123 1.1 mrg -I${X11SRCDIR.pixman}/pixman 124 1.1 mrg 125 1.16 jmcneill # With pixman 0.28.3, HAVE_PTHREAD_SETSPECIFIC is much faster than TLS 126 1.16 jmcneill CPPFLAGS+= -DHAVE_PTHREAD_SETSPECIFIC 127 1.16 jmcneill #CPPFLAGS+= -DTLS=__thread 128 1.12 mrg 129 1.7 veego LIBDPLIBS= m ${.CURDIR}/../../../../../lib/libm 130 1.7 veego 131 1.5 cube PKGCONFIG= pixman-1 132 1.5 cube PKGDIST= pixman 133 1.5 cube 134 1.1 mrg .include <bsd.x11.mk> 135 1.1 mrg .include <bsd.lib.mk> 136