X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2FMakefile;h=f119b728e3897214f23f48d5a5824c1b0ef8d981;hb=58d9f25f25c0070c3c3df3073f375d87a9163e88;hp=a19aa3399118765797b2a29df70be5b34de79964;hpb=6d5e39acd6ad8eb295442f127df2216d3ed992f9;p=pciutils.git diff --git a/lib/Makefile b/lib/Makefile index a19aa33..f119b72 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,9 +1,9 @@ # Makefile for The PCI Library -# (c) 1999--2008 Martin Mares +# (c) 1999--2014 Martin Mares # 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 caps +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,10 @@ ifdef PCI_HAVE_PM_NBSD_LIBPCI OBJS += nbsd-libpci endif +ifdef PCI_HAVE_PM_DARWIN_DEVICE +OBJS += darwin +endif + all: $(PCILIB) $(PCILIBPC) ifeq ($(SHARED),no) @@ -52,7 +56,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 @@ -80,5 +88,6 @@ 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)