Annotation of /trunk/pciutils/patches/pciutils-2.2.0-shared-lib.patch
Parent Directory | Revision Log
Revision 153 -
(hide annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 496 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 496 byte(s)
-import
1 | niro | 153 | --- pciutils/lib/Makefile |
2 | +++ pciutils/lib/Makefile | ||
3 | @@ -7,6 +7,7 @@ | ||
4 | INCL=internal.h pci.h config.h header.h sysdep.h types.h | ||
5 | |||
6 | PCILIB=libpci.a | ||
7 | +PCISHLIB=libpci.so | ||
8 | |||
9 | ifdef PCI_HAVE_PM_LINUX_SYSFS | ||
10 | OBJS += sysfs.o | ||
11 | @@ -45,7 +46,15 @@ | ||
12 | PCILIB=libpciutils.a | ||
13 | endif | ||
14 | |||
15 | -all: $(PCILIB) | ||
16 | +all: $(PCILIB) $(PCISHLIB) | ||
17 | + | ||
18 | +SHOBJS = $(OBJS:.o=.lo) | ||
19 | + | ||
20 | +%.lo: %.c | ||
21 | + $(CC) $(CFLAGS) -fPIC -c -o $@ $^ | ||
22 | + | ||
23 | +$(PCISHLIB): $(SHOBJS) | ||
24 | + $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ $^ -fPIC | ||
25 | |||
26 | $(PCILIB): $(OBJS) | ||
27 | rm -f $@ |