]> git.ipfire.org Git - thirdparty/pciutils.git/blob - lib/Makefile
Include file splits and namespace cleanups.
[thirdparty/pciutils.git] / lib / Makefile
1 # Makefile for The PCI Library
2 # (c) 1999 Martin Mares <mj@ucw.cz>
3
4 include config.mk
5
6 OBJS=access.o generic.o dump.o names.o filter.o
7 INCL=internal.h pci.h config.h header.h sysdep.h types.h
8
9 PCILIB=libpci.a
10
11 ifdef PCI_HAVE_PM_LINUX_SYSFS
12 OBJS += sysfs.o
13 endif
14
15 ifdef PCI_HAVE_PM_LINUX_PROC
16 OBJS += proc.o
17 endif
18
19 ifdef PCI_HAVE_PM_INTEL_CONF
20 OBJS += i386-ports.o
21 endif
22
23 ifdef PCI_HAVE_PM_DUMP
24 OBJS += dump.o
25 endif
26
27 ifdef PCI_HAVE_PM_SYSCALLS
28 OBJS += syscalls.o
29 endif
30
31 ifdef PCI_HAVE_PM_FBSD_DEVICE
32 OBJS += fbsd-device.o
33 CFLAGS += -I/usr/src/sys
34 ifdef FREEBSD_SYS
35 CFLAGS += -I${FREEBSD_SYS}
36 endif
37 endif
38
39 ifdef PCI_HAVE_PM_AIX_DEVICE
40 OBJS += aix-device.o
41 endif
42
43 ifdef PCI_HAVE_PM_NBSD_LIBPCI
44 OBJS += nbsd-libpci.o
45 PCILIB=libpciutils.a
46 endif
47
48 all: $(PCILIB)
49
50 $(PCILIB): $(OBJS)
51 rm -f $@
52 ar rcs $@ $^
53 ranlib $@
54
55 access.o: access.c $(INCL)
56 i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h
57 proc.o: proc.c $(INCL) pread.h
58 sysfs.o: sysfs.c $(INCL) pread.h
59 generic.o: generic.c $(INCL)
60 syscalls.o: syscalls.c $(INCL)
61 fbsd-device.o: fbsd-device.c $(INCL)
62 aix-device.o: aix-device.c $(INCL)
63 dump.o: dump.c $(INCL)
64 names.o: names.c $(INCL)
65 filter.o: filter.c $(INCL)
66 nbsd-libpci.o: nbsd-libpci.c $(INCL)