]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/Makefile
Avoid unsupported printf format attribute when building with gcc2 (required for BeOS).
[pciutils.git] / lib / Makefile
index 83f413ec123c034533e36a73b1dd63d58f507f11..1eb06a566fc90d1d23564cdff14460571bdd61f6 100644 (file)
@@ -3,7 +3,7 @@
 
 # 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 params caps
 INCL=internal.h pci.h config.h header.h sysdep.h types.h
 
 ifdef PCI_HAVE_PM_LINUX_SYSFS
@@ -50,9 +50,9 @@ $(PCILIB): $(addsuffix .o,$(OBJS))
        $(AR) rcs $@ $^
        $(RANLIB) $@
 else
-CFLAGS += -fPIC
+CFLAGS += -fPIC -fvisibility=hidden
 $(PCILIB): $(addsuffix .o,$(OBJS))
-       $(CC) -shared $(SONAME) -o $@ $^ $(LIB_LDLIBS)
+       $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
 endif
 
 $(PCILIBPC): libpci.pc.in
@@ -66,7 +66,7 @@ $(PCILIBPC): libpci.pc.in
 init.o: init.c $(INCL)
 access.o: access.c $(INCL)
 params.o: params.c $(INCL)
-i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h i386-io-windows.h
+i386-ports.o: i386-ports.c $(INCL) i386-io-hurd.h i386-io-linux.h i386-io-sunos.h i386-io-windows.h i386-io-cygwin.h
 proc.o: proc.c $(INCL) pread.h
 sysfs.o: sysfs.c $(INCL) pread.h
 generic.o: generic.c $(INCL)
@@ -82,5 +82,3 @@ names-net.o: names-net.c $(INCL) names.h
 names-parse.o: names-parse.c $(INCL) names.h
 filter.o: filter.c $(INCL)
 nbsd-libpci.o: nbsd-libpci.c $(INCL)
-
-example: example.c $(PCILIB)