~peter-pearse/ubuntu/natty/pciutils/prop001

« back to all changes in this revision

Viewing changes to lib/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2008-04-29 16:23:38 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080429162338-v20040rx66khbl7v
Tags: 1:3.0.0-3
libpci-dev conflicts with pciutils-dev. Closes: #478290

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
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
 
2
# (c) 1999--2008 Martin Mares <mj@ucw.cz>
 
3
 
 
4
# Expects to be invoked from the top-level Makefile and uses lots of its variables.
 
5
 
 
6
OBJS=init access generic dump names filter names-hash names-parse names-net names-cache params
7
7
INCL=internal.h pci.h config.h header.h sysdep.h types.h
8
8
 
9
 
PCILIB=libpci.a
10
 
CFLAGS += -fPIC
11
 
 
12
9
ifdef PCI_HAVE_PM_LINUX_SYSFS
13
 
OBJS += sysfs.o
 
10
OBJS += sysfs
14
11
endif
15
12
 
16
13
ifdef PCI_HAVE_PM_LINUX_PROC
17
 
OBJS += proc.o
 
14
OBJS += proc
18
15
endif
19
16
 
20
17
ifdef PCI_HAVE_PM_INTEL_CONF
21
 
OBJS += i386-ports.o
 
18
OBJS += i386-ports
22
19
endif
23
20
 
24
21
ifdef PCI_HAVE_PM_DUMP
25
 
OBJS += dump.o
26
 
endif
27
 
 
28
 
ifdef PCI_HAVE_PM_SYSCALLS
29
 
OBJS += syscalls.o
 
22
OBJS += dump
30
23
endif
31
24
 
32
25
ifdef PCI_HAVE_PM_FBSD_DEVICE
33
 
OBJS += fbsd-device.o
 
26
OBJS += fbsd-device
34
27
CFLAGS += -I/usr/src/sys
35
28
ifdef FREEBSD_SYS
36
29
CFLAGS += -I${FREEBSD_SYS}
38
31
endif
39
32
 
40
33
ifdef PCI_HAVE_PM_OBSD_DEVICE
41
 
OBJS += obsd-device.o
 
34
OBJS += obsd-device
42
35
endif
43
36
 
44
37
ifdef PCI_HAVE_PM_AIX_DEVICE
45
 
OBJS += aix-device.o
 
38
OBJS += aix-device
46
39
endif
47
40
 
48
41
ifdef PCI_HAVE_PM_NBSD_LIBPCI
49
 
OBJS += nbsd-libpci.o
50
 
PCILIB=libpciutils.a
 
42
OBJS += nbsd-libpci
51
43
endif
52
44
 
53
 
all: $(PCILIB)
54
 
 
55
 
$(PCILIB): $(OBJS)
 
45
PCILIBA=libpci.a
 
46
 
 
47
all: $(PCILIB) $(PCILIBA) $(PCILIBPC)
 
48
 
 
49
# ifeq ($(SHARED),no)
 
50
$(PCILIBA): $(addsuffix .o,$(OBJS))
56
51
        rm -f $@
57
 
        ar rcs $@ $^
58
 
        ranlib $@
59
 
 
 
52
        $(AR) rcs $@ $^
 
53
        $(RANLIB) $@
 
54
# else
 
55
CFLAGS += -fPIC -fvisibility=hidden
 
56
$(PCILIB): $(addsuffix .o,$(OBJS))
 
57
        $(CC) -shared $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
 
58
# endif
 
59
 
 
60
$(PCILIBPC): libpci.pc.in
 
61
        sed <$< >$@ -e 's,@PREFIX@,$(PREFIX),' \
 
62
                -e 's,@INCDIR@,$(INCDIR),' \
 
63
                -e 's,@LIBDIR@,$(LIBDIR),' \
 
64
                -e 's,@IDSDIR@,$(IDSDIR),' \
 
65
                -e 's,@VERSION@,$(VERSION),' \
 
66
                -e 's,@LDLIBS@,$(LDLIBS),'
 
67
 
 
68
init.o: init.c $(INCL)
60
69
access.o: access.c $(INCL)
61
 
i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h
 
70
params.o: params.c $(INCL)
 
71
i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h i386-io-windows.h
62
72
proc.o: proc.c $(INCL) pread.h
63
73
sysfs.o: sysfs.c $(INCL) pread.h
64
74
generic.o: generic.c $(INCL)
67
77
fbsd-device.o: fbsd-device.c $(INCL)
68
78
aix-device.o: aix-device.c $(INCL)
69
79
dump.o: dump.c $(INCL)
70
 
names.o: names.c $(INCL)
 
80
names.o: names.c $(INCL) names.h
 
81
names-cache.o: names-cache.c $(INCL) names.h
 
82
names-hash.o: names-hash.c $(INCL) names.h
 
83
names-net.o: names-net.c $(INCL) names.h
 
84
names-parse.o: names-parse.c $(INCL) names.h
71
85
filter.o: filter.c $(INCL)
72
86
nbsd-libpci.o: nbsd-libpci.c $(INCL)
73
 
 
74
 
example: example.c $(PCILIB)