1727ce158SMartin Mares# Makefile for The PCI Library 2a27a33ddSMartin Mares# (c) 1999 Martin Mares <[email protected]> 3727ce158SMartin Mares 4727ce158SMartin Maresinclude config.mk 5727ce158SMartin Mares 63430bafeSMartin MaresOBJS=access.o generic.o dump.o names.o filter.o 7489233b4SMartin MaresINCL=internal.h pci.h config.h header.h sysdep.h types.h 8727ce158SMartin Mares 9848b4347SMartin MaresPCILIB=libpci.a 10848b4347SMartin Mares 11489233b4SMartin Maresifdef PCI_HAVE_PM_LINUX_SYSFS 1211f7b31bSMartin MaresOBJS += sysfs.o 1311f7b31bSMartin Maresendif 1411f7b31bSMartin Mares 15489233b4SMartin Maresifdef PCI_HAVE_PM_LINUX_PROC 16727ce158SMartin MaresOBJS += proc.o 17727ce158SMartin Maresendif 18727ce158SMartin Mares 19489233b4SMartin Maresifdef PCI_HAVE_PM_INTEL_CONF 20727ce158SMartin MaresOBJS += i386-ports.o 21727ce158SMartin Maresendif 22727ce158SMartin Mares 23489233b4SMartin Maresifdef PCI_HAVE_PM_DUMP 24727ce158SMartin MaresOBJS += dump.o 25727ce158SMartin Maresendif 26727ce158SMartin Mares 27489233b4SMartin Maresifdef PCI_HAVE_PM_SYSCALLS 28727ce158SMartin MaresOBJS += syscalls.o 29727ce158SMartin Maresendif 30727ce158SMartin Mares 31489233b4SMartin Maresifdef PCI_HAVE_PM_FBSD_DEVICE 32168b4f46SMartin MaresOBJS += fbsd-device.o 33168b4f46SMartin MaresCFLAGS += -I/usr/src/sys 3445902995SMartin Maresifdef FREEBSD_SYS 3545902995SMartin MaresCFLAGS += -I${FREEBSD_SYS} 3645902995SMartin Maresendif 37168b4f46SMartin Maresendif 38168b4f46SMartin Mares 39b6359063SMartin Maresifdef PCI_HAVE_PM_OBSD_DEVICE 40b6359063SMartin MaresOBJS += obsd-device.o 41b6359063SMartin Maresendif 42b6359063SMartin Mares 43489233b4SMartin Maresifdef PCI_HAVE_PM_AIX_DEVICE 4414d6c0a3SMartin MaresOBJS += aix-device.o 4514d6c0a3SMartin Maresendif 4614d6c0a3SMartin Mares 47489233b4SMartin Maresifdef PCI_HAVE_PM_NBSD_LIBPCI 48848b4347SMartin MaresOBJS += nbsd-libpci.o 49848b4347SMartin MaresPCILIB=libpciutils.a 50848b4347SMartin Maresendif 51848b4347SMartin Mares 52848b4347SMartin Maresall: $(PCILIB) 53727ce158SMartin Mares 54848b4347SMartin Mares$(PCILIB): $(OBJS) 55727ce158SMartin Mares rm -f $@ 56727ce158SMartin Mares ar rcs $@ $^ 57727ce158SMartin Mares ranlib $@ 58727ce158SMartin Mares 59727ce158SMartin Maresaccess.o: access.c $(INCL) 6011f7b31bSMartin Maresi386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h 6111f7b31bSMartin Maresproc.o: proc.c $(INCL) pread.h 6211f7b31bSMartin Maressysfs.o: sysfs.c $(INCL) pread.h 63727ce158SMartin Maresgeneric.o: generic.c $(INCL) 64727ce158SMartin Maressyscalls.o: syscalls.c $(INCL) 65168b4f46SMartin Maresfbsd-device.o: fbsd-device.c $(INCL) 6614d6c0a3SMartin Maresaix-device.o: aix-device.c $(INCL) 67727ce158SMartin Maresdump.o: dump.c $(INCL) 68727ce158SMartin Maresnames.o: names.c $(INCL) 69727ce158SMartin Maresfilter.o: filter.c $(INCL) 70848b4347SMartin Maresnbsd-libpci.o: nbsd-libpci.c $(INCL) 71*14d4f989SMartin Mares 72*14d4f989SMartin Maresexample: example.c $(PCILIB) 73