xref: /illumos-gate/usr/src/data/hwdata/Makefile (revision 29940bf8)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
56927f468Sdp# Common Development and Distribution License (the "License").
66927f468Sdp# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
215084e753SMark J. Nelson
227c478bd9Sstevel@tonic-gate#
235084e753SMark J. Nelson# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
240b0972bdSDan McDonald# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
257e934d3aSAndy Fiddaman# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
28503609a9SYuri Pankovinclude		$(SRC)/data/Makefile.data
296927f468Sdp
307e934d3aSAndy FiddamanHWDATA=		pci.ids usb.ids efi.fixes
31503609a9SYuri PankovHWDATADIR=	$(ROOT)/usr/share/hwdata
32503609a9SYuri PankovROOTHWDATA=	$(HWDATA:%=$(HWDATADIR)/%)
336927f468Sdp
347e934d3aSAndy FiddamanCLOBBERFILES=	THIRDPARTYLICENSE.pciids THIRDPARTYLICENSE.efifixes
357c478bd9Sstevel@tonic-gate
36503609a9SYuri Pankov$(ROOTHWDATA):=	FILEMODE = 444
375084e753SMark J. Nelson
387e934d3aSAndy Fiddamanall install:	THIRDPARTYLICENSE.pciids THIRDPARTYLICENSE.efifixes
395084e753SMark J. Nelson
405084e753SMark J. NelsonTHIRDPARTYLICENSE.pciids: pci.ids THIRDPARTYLICENSE.pciids.tmpl
41503609a9SYuri Pankov		$(RM) $@
42503609a9SYuri Pankov		$(SED) -e '/^$$/,$$ d' < pci.ids > $@
43503609a9SYuri Pankov		$(CAT) THIRDPARTYLICENSE.pciids.tmpl >> $@
447c478bd9Sstevel@tonic-gate
457e934d3aSAndy FiddamanTHIRDPARTYLICENSE.efifixes: efi.fixes THIRDPARTYLICENSE.efifixes.tmpl
467e934d3aSAndy Fiddaman		$(RM) $@
477e934d3aSAndy Fiddaman		$(SED) -e '/^$$/,$$ d' < efi.fixes > $@
487e934d3aSAndy Fiddaman		$(CAT) THIRDPARTYLICENSE.efifixes.tmpl >> $@
497e934d3aSAndy Fiddaman
50503609a9SYuri Pankovinstall:	$(ROOTHWDATA)
5118c2aff7Sartem
5218c2aff7Sartem$(HWDATADIR)/%: %
53503609a9SYuri Pankov		$(INS.file)
5418c2aff7Sartem
55503609a9SYuri Pankovclean:
5618c2aff7Sartem
570b0972bdSDan McDonald# The "update" target family allows a simple pull-from-the-source update.
580b0972bdSDan McDonald# One can then use revision-control diffs to see what actually changed.
59503609a9SYuri Pankovupdate:		usb.update pci.update
600b0972bdSDan McDonald
610b0972bdSDan McDonald# URLs for PCI IDs and USB IDs
62*29940bf8SRobert MustacchiPCIURL=		https://pci-ids.ucw.cz/v2.2/pci.ids
63503609a9SYuri PankovUSBURL=		http://www.linux-usb.org/usb.ids
640b0972bdSDan McDonald
650b0972bdSDan McDonald# These could move into Makefile.master
66503609a9SYuri PankovURL_FETCH=	wget
670b0972bdSDan McDonaldURL_FETCHARGS=
680b0972bdSDan McDonald
690b0972bdSDan McDonaldpci.update:
70503609a9SYuri Pankov		$(RM) pci.ids
71503609a9SYuri Pankov		$(URL_FETCH) $(URL_FETCHARGS) $(PCIURL)
720b0972bdSDan McDonald
730b0972bdSDan McDonaldusb.update:
74503609a9SYuri Pankov		$(RM) usb.ids
75503609a9SYuri Pankov		$(URL_FETCH) $(URL_FETCHARGS) $(USBURL)
760b0972bdSDan McDonald
77503609a9SYuri Pankovinclude		$(SRC)/data/Makefile.targ
78