]> mj.ucw.cz Git - pciutils.git/commitdiff
libpci: Do not build physmem-posix.c when not needed
authorPali Rohár <pali@kernel.org>
Sun, 18 Feb 2024 18:43:13 +0000 (19:43 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 18 Feb 2024 19:04:39 +0000 (20:04 +0100)
lib/Makefile

index 5c438eba6de22b1902d76d90e4b9a4b1bbbdd235..26ea170b40f1202b9cda71f5d80525c900de6742 100644 (file)
@@ -20,10 +20,12 @@ endif
 
 ifdef PCI_HAVE_PM_MMIO_CONF
 OBJS += mmio-ports
 
 ifdef PCI_HAVE_PM_MMIO_CONF
 OBJS += mmio-ports
+PCI_USE_PHYSMEM = 1
 endif
 
 ifdef PCI_HAVE_PM_ECAM
 OBJS += ecam
 endif
 
 ifdef PCI_HAVE_PM_ECAM
 OBJS += ecam
+PCI_USE_PHYSMEM = 1
 endif
 
 ifdef PCI_HAVE_PM_DUMP
 endif
 
 ifdef PCI_HAVE_PM_DUMP
@@ -79,11 +81,13 @@ ifdef PCI_OS_WINDOWS
 OBJS += win32-helpers
 endif
 
 OBJS += win32-helpers
 endif
 
+ifdef PCI_USE_PHYSMEM
 ifndef PCI_OS_WINDOWS
 ifndef PCI_OS_DJGPP
 OBJS += physmem-posix
 endif
 endif
 ifndef PCI_OS_WINDOWS
 ifndef PCI_OS_DJGPP
 OBJS += physmem-posix
 endif
 endif
+endif
 
 all: $(PCILIB) $(PCILIBPC)
 
 
 all: $(PCILIB) $(PCILIBPC)
 
@@ -133,8 +137,8 @@ init.o: init.c $(INCL)
 access.o: access.c $(INCL)
 params.o: params.c $(INCL)
 i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h i386-io-windows.h i386-io-cygwin.h
 access.o: access.c $(INCL)
 params.o: params.c $(INCL)
 i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h i386-io-windows.h i386-io-cygwin.h
-mmio-ports.o: mmio-ports.c $(INCL)
-ecam.o: ecam.c $(INCL)
+mmio-ports.o: mmio-ports.c $(INCL) physmem.h physmem-access.h
+ecam.o: ecam.c $(INCL) physmem.h physmem-access.h
 proc.o: proc.c $(INCL)
 sysfs.o: sysfs.c $(INCL)
 generic.o: generic.c $(INCL)
 proc.o: proc.c $(INCL)
 sysfs.o: sysfs.c $(INCL)
 generic.o: generic.c $(INCL)