Zap silly #if NPCI > 0 and the hoops that we jump through for the module

case.  Use an 'and' case in conf/files so that it only gets compiled if
pci is present.
This commit is contained in:
Peter Wemm 2001-01-29 11:38:39 +00:00
parent 0634b4a7b2
commit 93cd41f72d
3 changed files with 2 additions and 16 deletions

View File

@ -489,7 +489,7 @@ dev/stg/tmc18c30_pccard.c optional stg card
dev/stg/tmc18c30_isa.c optional stg isa
dev/sym/sym_hipd.c optional sym \
dependency "$S/dev/sym/sym_{conf,defs}.h"
dev/tdfx/tdfx_pci.c optional tdfx
dev/tdfx/tdfx_pci.c optional tdfx pci
dev/twe/twe.c optional twe
dev/twe/twe_freebsd.c optional twe
#

View File

@ -38,12 +38,6 @@
* and Jens Axboe, located at http://linux.3dfx.com.
*/
/*
* put this here, so as to bail out immediately if we have no PCI BUS installed
*/
#include "pci.h"
#if NPCI > 0
#include <sys/param.h>
#include <sys/bus_private.h>
@ -871,6 +865,3 @@ static driver_t tdfx_driver = {
/* Tell Mr. Kernel about us! */
DRIVER_MODULE(tdfx, pci, tdfx_driver, tdfx_devclass, 0, 0);
#endif /* NPCI */

View File

@ -6,12 +6,10 @@ MAINTAINER= cokane@FreeBSD.org
KMOD= 3dfx
NOMAN= YES
SRCS= opt_tdfx.h pci.h bus_if.h pci_if.h device_if.h tdfx_pci.h tdfx_io.h\
SRCS= opt_tdfx.h bus_if.h pci_if.h device_if.h tdfx_pci.h tdfx_io.h\
tdfx_vars.h tdfx_pci.c
INCSRC= ../../sys
CLEANFILES= pci.h
.if ${MACHINE_ARCH} == "i386"
# This line enables linux ioctl handling by default
# comment out if you don't want it
@ -21,9 +19,6 @@ TDFX_OPTS= "\#define TDFX_LINUX"
# Uncomment this for debugging messages
#CFLAGS+= -DDEBUG
pci.h:
echo "#define NPCI 1" > pci.h
opt_tdfx.h:
touch opt_tdfx.h
echo $(TDFX_OPTS) >> opt_tdfx.h