X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2FMakefile;h=31ca1c106ddc78149edd3ee2041846af4e5508a7;hb=d45531756b426fb883e78deb412be3c031bb7675;hp=1a729da7c5e5a3b2f540270c8195381a9ead04b1;hpb=d7ea742c6db9993512d809097a1b154c2bae82c9;p=pciutils.git diff --git a/lib/Makefile b/lib/Makefile index 1a729da..31ca1c1 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,7 +1,7 @@ # Makefile for The PCI Library # (c) 1999--2008 Martin Mares -include config.mk +# 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 INCL=internal.h pci.h config.h header.h sysdep.h types.h @@ -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 $(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)