]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/Makefile
i386-ports: Do not mark pci_access in conf12_cleanup() as unused
[pciutils.git] / lib / Makefile
index 31ca1c106ddc78149edd3ee2041846af4e5508a7..0332508bce7383caae1f5e6c9c0fa1ae097fcba8 100644 (file)
@@ -1,9 +1,9 @@
 # Makefile for The PCI Library
-# (c) 1999--2008 Martin Mares <mj@ucw.cz>
+# (c) 1999--2014 Martin Mares <mj@ucw.cz>
 
 # Expects to be invoked from the top-level Makefile and uses lots of its variables.
 
-OBJS=init access generic dump names filter names-hash names-parse names-net names-cache params
+OBJS=init access generic dump names filter names-hash names-parse names-net names-cache names-hwdb params caps
 INCL=internal.h pci.h config.h header.h sysdep.h types.h
 
 ifdef PCI_HAVE_PM_LINUX_SYSFS
@@ -42,6 +42,18 @@ ifdef PCI_HAVE_PM_NBSD_LIBPCI
 OBJS += nbsd-libpci
 endif
 
+ifdef PCI_HAVE_PM_DARWIN_DEVICE
+OBJS += darwin
+endif
+
+ifdef PCI_HAVE_PM_SYLIXOS_DEVICE
+OBJS += sylixos-device
+endif
+
+ifdef PCI_HAVE_PM_HURD_CONF
+OBJS += hurd
+endif
+
 all: $(PCILIB) $(PCILIBPC)
 
 ifeq ($(SHARED),no)
@@ -52,7 +64,11 @@ $(PCILIB): $(addsuffix .o,$(OBJS))
 else
 CFLAGS += -fPIC -fvisibility=hidden
 $(PCILIB): $(addsuffix .o,$(OBJS))
-       $(CC) -shared $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
+ ifdef PCI_HAVE_PM_DARWIN_DEVICE
+       $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,-install_name,$(LIBDIR)/$(PCILIB) -o $@ $^ $(LIB_LDLIBS)
+ else
+       $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
+ endif
 endif
 
 $(PCILIBPC): libpci.pc.in
@@ -61,7 +77,8 @@ $(PCILIBPC): libpci.pc.in
                -e 's,@LIBDIR@,$(LIBDIR),' \
                -e 's,@IDSDIR@,$(IDSDIR),' \
                -e 's,@VERSION@,$(VERSION),' \
-               -e 's,@LDLIBS@,$(LDLIBS),'
+               -e 's,@LDLIBS@,$(LDLIBS),' \
+               -e 's,@WITH_LIBS@,$(WITH_LIBS),'
 
 init.o: init.c $(INCL)
 access.o: access.c $(INCL)
@@ -80,5 +97,7 @@ names-cache.o: names-cache.c $(INCL) names.h
 names-hash.o: names-hash.c $(INCL) names.h
 names-net.o: names-net.c $(INCL) names.h
 names-parse.o: names-parse.c $(INCL) names.h
+names-hwdb.o: names-hwdb.c $(INCL) names.h
 filter.o: filter.c $(INCL)
 nbsd-libpci.o: nbsd-libpci.c $(INCL)
+hurd.o: hurd.c $(INCL)