1 # $NetBSD: Makefile,v 1.11 2016/05/10 19:38:29 pooka Exp $ 2 # 3 4 RUMPTOP= ${TOPRUMP} 5 6 .include <bsd.own.mk> 7 8 .PATH: ${RUMPTOP}/../dev/pci 9 10 LIB= rumpdev_pci 11 COMMENT=PCI bus support 12 13 IOCONF= PCI.ioconf 14 15 SRCS+= pci.c pci_map.c pci_quirks.c pci_subr.c pci_stub.c pci_usrreq.c 16 SRCS+= pcibusprint.c 17 18 SRCS+= rumpdev_pci.c 19 20 # ok, these don't _really_ belong here, but it's the only 21 # place they're currently useful, so let it slide 22 SRCS+= rumpdev_bus_space.c 23 SRCS+= rumpdev_bus_dma.c 24 25 SRCS+= pci_at_mainbus.c 26 27 .if ${RUMP_PCI_IOSPACE:Uno} == "yes" 28 .error RUMP_PCI_IOSPACE defined in Makefile. Use userfeatures.h instead. 29 .endif 30 31 RUMPCOMP_USER_CPPFLAGS:=-I${.PARSEDIR} 32 33 # current state-of-the-art interface (remains to be seen if it's "good enuf") 34 .ifdef RUMPCOMP_MAKEFILEINC_rumpdev_pci 35 .include "${RUMPCOMP_MAKEFILEINC_rumpdev_pci}" 36 .endif 37 38 # old-style ("compat") interfaces. will go away some day or year. 39 # why? the "protocol" requires passing variables via the env, and 40 # the names include dots which POSIX does not, strictly speaking, 41 # allow in env names. There is at least one shell (dash >= 0.58) 42 # which refuses to pass variables with dots. 43 .if defined(RUMPCOMP_USER_SRCS.rumpdev_pci) \ 44 || defined(RUMPCOMP_MAKEFILEINC.rumpdev_pci) 45 .warning Use new style RUMPCOMP_MAKEFILEINC_rumpdev_pci 46 .endif 47 .ifdef RUMPCOMP_USER_PATH.rumpdev_pci 48 .PATH: ${RUMPCOMP_USER_PATH.rumpdev_pci} 49 RUMPCOMP_USER_SRCS= ${RUMPCOMP_USER_SRCS.rumpdev_pci} 50 RUMPCOMP_USER_CPPFLAGS+=${RUMPCOMP_USER_CPPFLAGS.rumpdev_pci} 51 RUMPCOMP_USER_CFLAGS= ${RUMPCOMP_USER_CFLAGS.rumpdev_pci} 52 CPPFLAGS+= ${RUMPCOMP_CPPFLAGS.rumpdev_pci} 53 .endif 54 .ifdef RUMPCOMP_MAKEFILEINC.rumpdev_pci 55 .include "${RUMPCOMP_MAKEFILEINC.rumpdev_pci}" 56 .endif 57 58 # XXX: messy 59 .undef RUMPKERN_ONLY 60 61 .include "${RUMPTOP}/Makefile.rump" 62 .include <bsd.lib.mk> 63 .include <bsd.klinks.mk> 64