1 # Makefile for The PCI Library
2 # (c) 1999--2008 Martin Mares <mj@ucw.cz>
6 OBJS=access.o generic.o dump.o names.o filter.o names-hash.o names-parse.o
7 INCL=internal.h pci.h config.h header.h sysdep.h types.h
12 ifdef PCI_HAVE_PM_LINUX_SYSFS
16 ifdef PCI_HAVE_PM_LINUX_PROC
20 ifdef PCI_HAVE_PM_INTEL_CONF
24 ifdef PCI_HAVE_PM_DUMP
28 ifdef PCI_HAVE_PM_FBSD_DEVICE
30 CFLAGS += -I/usr/src/sys
32 CFLAGS += -I${FREEBSD_SYS}
36 ifdef PCI_HAVE_PM_OBSD_DEVICE
40 ifdef PCI_HAVE_PM_AIX_DEVICE
44 ifdef PCI_HAVE_PM_NBSD_LIBPCI
50 OBJS += names-net.o names-cache.o
52 all: $(PCILIB) $(PCILIBPC)
59 $(PCILIBPC): $(PCILIBPC).in
60 sed <$< >$@ -e 's,@PREFIX@,$(PREFIX),' \
61 -e 's,@INCDIR@,$(INCDIR),' \
62 -e 's,@LIBDIR@,$(LIBDIR),' \
63 -e 's,@IDSDIR@,$(IDSDIR),' \
64 -e 's,@VERSION@,$(VERSION),' \
65 -e 's,@LIBZ@,$(LIBZ),'
67 access.o: access.c $(INCL)
68 i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h i386-io-windows.h
69 proc.o: proc.c $(INCL) pread.h
70 sysfs.o: sysfs.c $(INCL) pread.h
71 generic.o: generic.c $(INCL)
72 syscalls.o: syscalls.c $(INCL)
73 obsd-device.o: obsd-device.c $(INCL)
74 fbsd-device.o: fbsd-device.c $(INCL)
75 aix-device.o: aix-device.c $(INCL)
76 dump.o: dump.c $(INCL)
77 names.o: names.c $(INCL) names.h
78 names-cache.o: names-cache.c $(INCL) names.h
79 names-hash.o: names-hash.c $(INCL) names.h
80 names-net.o: names-net.c $(INCL) names.h
81 names-parse.o: names-parse.c $(INCL) names.h
82 filter.o: filter.c $(INCL)
83 nbsd-libpci.o: nbsd-libpci.c $(INCL)
85 example: example.c $(PCILIB)