From: Mike Frysinger Date: Fri, 30 May 2014 15:23:49 +0000 (-0400) Subject: add knobs for gzip/pci/usb X-Git-Tag: hwids-20140602~1^2^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F8%2Fhead;p=oweals%2Fhwids.git add knobs for gzip/pci/usb Not all systems need these features, so add knobs to turn them off. --- diff --git a/Makefile b/Makefile index 0cbaddd..19f6046 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,24 @@ else endif PKG_CONFIG ?= pkg-config +GZIP ?= yes +NET ?= yes +PCI ?= yes UDEV ?= no +USB ?= yes -ALL_TARGETS-yes = compress +COMPRESS_FILES-yes = +COMPRESS_FILES-$(PCI) += pci.ids.gz +COMPRESS_FILES-$(USB) += usb.ids.gz + +DATA_FILES-yes = +DATA_FILES-$(GZIP) += $(COMPRESS_FILES-yes) +DATA_FILES-$(NET) += oui.txt iab.txt +DATA_FILES-$(PCI) += pci.ids +DATA_FILES-$(USB) += usb.ids + +ALL_TARGETS-yes = +ALL_TARGETS-$(GZIP) += $(COMPRESS_FILES-yes) ALL_TARGETS-$(UDEV) += udev-hwdb INSTALL_TARGETS-yes = install-base @@ -51,11 +66,13 @@ MISCDIR=/usr/share/misc HWDBDIR=$(shell $(PKG_CONFIG) --variable=udevdir udev)/hwdb.d DOCDIR=/usr/share/doc/hwids -install-base: compress +install-base: $(DATA_FILES-yes) mkdir -p $(DESTDIR)$(DOCDIR) install -p -m 644 README.md $(DESTDIR)$(DOCDIR) +ifneq ($(strip $(DATA_FILES-yes)),) mkdir -p $(DESTDIR)$(MISCDIR) - install -p -m 644 usb.ids pci.ids usb.ids.gz pci.ids.gz oui.txt iab.txt $(DESTDIR)$(MISCDIR) + install -p -m 644 $(DATA_FILES-yes) $(DESTDIR)$(MISCDIR) +endif install-hwdb: mkdir -p $(DESTDIR)$(HWDBDIR)