Home | History | Annotate | Line # | Download | only in pixman
Makefile revision 1.45
      1 #	$NetBSD: Makefile,v 1.45 2025/07/24 00:37:03 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-region64f.c		\
     36 	pixman-solid-fill.c		\
     37 	pixman-timer.c			\
     38 	pixman-trap.c			\
     39 	pixman-utils.c
     40 
     41 SRCS+=					\
     42 	pixman-arm.c			\
     43 	pixman-mips.c			\
     44 	pixman-ppc.c			\
     45 	pixman-riscv.c			\
     46 	pixman-x86.c
     47 
     48 # XXX
     49 
     50 # missing: HAVE_GCC_VECTOR_EXTENSIONS
     51 
     52 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
     53 . if ${MACHINE_ARCH} == "i386"
     54 SRCS+= pixman-mmx.c
     55 COPTS.pixman-mmx.c=	-mmmx -fvisibility=hidden
     56 .  if defined(HAVE_LLVM)
     57 COPTS.pixman-mmx.c+=	-Wno-error=attributes
     58 .  endif
     59 MKDEPFLAGS+=		-mmmx
     60 . endif
     61 SRCS+=	pixman-sse2.c pixman-ssse3.c
     62 COPTS.pixman-sse2.c=	-msse2 -fvisibility=hidden
     63 COPTS.pixman-ssse3.c=	-msse3 -mssse3 -fvisibility=hidden
     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 -mvsx
     70 MKDEPFLAGS+=		-maltivec -mvsx
     71 .endif
     72 
     73 .if !empty(MACHINE_ARCH:Mearm*)
     74 # ARM SIMD
     75 SRCS+=		pixman-arm-simd.c 		\
     76 		pixman-arm-simd-asm.S		\
     77 		pixman-arm-simd-asm-scaled.S
     78 # ARM NEON
     79 SRCS+=		pixman-arm-neon.c		\
     80 		pixman-arm-neon-asm.S		\
     81 		pixman-arm-neon-asm-bilinear.S
     82 
     83 AFLAGS+=	${${ACTIVE_CC} == "clang" :? -fno-integrated-as :}
     84 # ARM iwMMX
     85 #SRCS+=		pixman-mmx.c
     86 #COPTS.pixman-mmx.c=	-mcpu=iwmmxt
     87 .endif
     88 
     89 .if !empty(MACHINE_ARCH:Maarch64*)
     90 # XXX not yet; new pixman bad on arm64.
     91 # ARM64 NEON
     92 SRCS+=		pixman-arm-neon.c			\
     93 		pixman-arma64-neon-asm.S		\
     94 		pixman-arma64-neon-asm-bilinear.S
     95 
     96 # XXX: not sure if needed?
     97 #AFLAGS+=	${${ACTIVE_CC} == "clang" :? -fno-integrated-as :}
     98 .endif
     99 
    100 .if !empty(MACHINE_ARCH:Mmips*64el) && empty(COPTS:M-march=*)
    101 # Loongson MMI
    102 SRCS+=		pixman-mmx.c
    103 #CPPFLAGS+=	-DUSE_LOONGSON_MMI
    104 # SIMD instructions use floatpoint registers so we need to enable their use
    105 COPTS.pixman-mmx.c=	-march=loongson2f -mhard-float -Wa,-mhard-float
    106 .endif
    107 
    108 .if ${MACHINE_CPU} == "sh3"
    109 # XXX pixman-fast-path.c:1204:1: internal compiler error: Segmentation fault
    110 COPTS.pixman-fast-path.c+=	-O1
    111 .endif
    112 
    113 .if !empty(MACHINE_ARCH:Mriscv*)
    114 # RISC-V RVV; Needs NetBSD porting.
    115 #SRCS+=	pixman-rvv.c
    116 .endif
    117 
    118 .include "Makefile.cflags"
    119 
    120 INCS=	pixman.h pixman-version.h
    121 INCSDIR=${X11INCDIR}/pixman-1
    122 
    123 LIBDPLIBS=	m	${.CURDIR}/../../../../../lib/libm
    124 
    125 PKGCONFIG=      pixman-1
    126 PKGDIST.pixman-1=       ${X11SRCDIR.pixman}/../include/pixman-1.pc
    127 .PATH: ${X11SRCDIR.pixman}/../include
    128 
    129 .include <bsd.x11.mk>
    130 .include <bsd.lib.mk>
    131