summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 10527c0..d2f26f6 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ includedir = $(prefix)/include
binaries = lspcidrake
lib_objs = common.o pciusb.o pci.o usb.o pciclass.o usbclass.o dmi.o
lib_major = libldetect.so.$(LIB_MAJOR)
-libraries = libldetect.so $(lib_major) $(lib_major).$(LIB_MINOR)
+libraries = libldetect.so $(lib_major) $(lib_major).$(LIB_MINOR) libldetect.a
CFLAGS = -Wall -W -Wstrict-prototypes -Os -fPIC
RPM ?= $(HOME)/rpm
@@ -27,6 +27,10 @@ $(lib_major): $(lib_major).$(LIB_MINOR)
libldetect.so: $(lib_major)
ln -sf $< $@
+libldetect.a: $(lib_objs)
+ ar -cru $@ $^
+ ranlib $@
+
pciclass.c: /usr/include/linux/pci.h /usr/include/linux/pci_ids.h
rm -f $@
perl generate_pciclass.pl $^ > $@