1 # $NetBSD: Makefile,v 1.11 2022/11/12 02:03:08 mrg Exp $ 2 3 .include <bsd.own.mk> 4 5 LIB= pciaccess 6 .PATH: ${X11SRCDIR.${LIB}}/src 7 .PATH: ${X11SRCDIR.${LIB}}/include 8 9 SRCS= common_bridge.c \ 10 common_io.c \ 11 common_iterator.c \ 12 common_init.c \ 13 common_interface.c \ 14 common_capability.c \ 15 common_device_name.c \ 16 common_map.c \ 17 common_vgaarb_stub.c \ 18 netbsd_pci.c 19 20 CPPFLAGS+= ${X11FLAGS} -I${X11SRCDIR.${LIB}}/include -DHAVE_ZLIB \ 21 -DHAVE_STRING_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H \ 22 -DPCIIDS_PATH=\"${X11ROOTDIR}/share/pciids\" 23 24 COPTS.common_init.c= -Wno-error 25 26 INCS= pciaccess.h 27 INCSDIR=${X11INCDIR} 28 29 PKGDIST= ${LIB} 30 PKGCONFIG_SED_FLAGS= \ 31 -e "s,@PCIACCESS_LIBS@,-lpci -lz," \ 32 33 LIBDPLIBS+= pci ${NETBSDSRCDIR}/lib/libpci \ 34 z ${NETBSDSRCDIR}/lib/libz 35 36 # do not blindly enable memory and IO access on macppc 37 .if ${MACHINE} == "macppc" 38 CPPFLAGS+= -DAVOID_DEVICE_ENABLE 39 .endif 40 41 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 42 CPPFLAGS+= -DHAVE_MTRR 43 LIBDPLIBS+= ${XORG_MACHINE_ARCH:U${MACHINE_ARCH}} ${NETBSDSRCDIR}/lib/libarch 44 .endif 45 46 .include <bsd.x11.mk> 47 .include <bsd.lib.mk> 48