xref: /illumos-gate/usr/src/data/hwdata/Makefile (revision 29940bf8af05acccf7b0a08eec421d2c1db7d560)
1503609a9SYuri Pankov#
2503609a9SYuri Pankov# CDDL HEADER START
3503609a9SYuri Pankov#
4503609a9SYuri Pankov# The contents of this file are subject to the terms of the
5503609a9SYuri Pankov# Common Development and Distribution License (the "License").
6503609a9SYuri Pankov# You may not use this file except in compliance with the License.
7503609a9SYuri Pankov#
8503609a9SYuri Pankov# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9503609a9SYuri Pankov# or http://www.opensolaris.org/os/licensing.
10503609a9SYuri Pankov# See the License for the specific language governing permissions
11503609a9SYuri Pankov# and limitations under the License.
12503609a9SYuri Pankov#
13503609a9SYuri Pankov# When distributing Covered Code, include this CDDL HEADER in each
14503609a9SYuri Pankov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15503609a9SYuri Pankov# If applicable, add the following below this CDDL HEADER, with the
16503609a9SYuri Pankov# fields enclosed by brackets "[]" replaced with your own identifying
17503609a9SYuri Pankov# information: Portions Copyright [yyyy] [name of copyright owner]
18503609a9SYuri Pankov#
19503609a9SYuri Pankov# CDDL HEADER END
20503609a9SYuri Pankov#
21503609a9SYuri Pankov
22503609a9SYuri Pankov#
23503609a9SYuri Pankov# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24503609a9SYuri Pankov# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
257e934d3aSAndy Fiddaman# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
26503609a9SYuri Pankov#
27503609a9SYuri Pankov
28503609a9SYuri Pankovinclude		$(SRC)/data/Makefile.data
29503609a9SYuri Pankov
307e934d3aSAndy FiddamanHWDATA=		pci.ids usb.ids efi.fixes
31503609a9SYuri PankovHWDATADIR=	$(ROOT)/usr/share/hwdata
32503609a9SYuri PankovROOTHWDATA=	$(HWDATA:%=$(HWDATADIR)/%)
33503609a9SYuri Pankov
347e934d3aSAndy FiddamanCLOBBERFILES=	THIRDPARTYLICENSE.pciids THIRDPARTYLICENSE.efifixes
35503609a9SYuri Pankov
36503609a9SYuri Pankov$(ROOTHWDATA):=	FILEMODE = 444
37503609a9SYuri Pankov
387e934d3aSAndy Fiddamanall install:	THIRDPARTYLICENSE.pciids THIRDPARTYLICENSE.efifixes
39503609a9SYuri Pankov
40503609a9SYuri PankovTHIRDPARTYLICENSE.pciids: pci.ids THIRDPARTYLICENSE.pciids.tmpl
41503609a9SYuri Pankov		$(RM) $@
42503609a9SYuri Pankov		$(SED) -e '/^$$/,$$ d' < pci.ids > $@
43503609a9SYuri Pankov		$(CAT) THIRDPARTYLICENSE.pciids.tmpl >> $@
44503609a9SYuri Pankov
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)
51503609a9SYuri Pankov
52503609a9SYuri Pankov$(HWDATADIR)/%: %
53503609a9SYuri Pankov		$(INS.file)
54503609a9SYuri Pankov
55503609a9SYuri Pankovclean:
56503609a9SYuri Pankov
57503609a9SYuri Pankov# The "update" target family allows a simple pull-from-the-source update.
58503609a9SYuri Pankov# One can then use revision-control diffs to see what actually changed.
59503609a9SYuri Pankovupdate:		usb.update pci.update
60503609a9SYuri Pankov
61503609a9SYuri Pankov# 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
64503609a9SYuri Pankov
65503609a9SYuri Pankov# These could move into Makefile.master
66503609a9SYuri PankovURL_FETCH=	wget
67503609a9SYuri PankovURL_FETCHARGS=
68503609a9SYuri Pankov
69503609a9SYuri Pankovpci.update:
70503609a9SYuri Pankov		$(RM) pci.ids
71503609a9SYuri Pankov		$(URL_FETCH) $(URL_FETCHARGS) $(PCIURL)
72503609a9SYuri Pankov
73503609a9SYuri Pankovusb.update:
74503609a9SYuri Pankov		$(RM) usb.ids
75503609a9SYuri Pankov		$(URL_FETCH) $(URL_FETCHARGS) $(USBURL)
76503609a9SYuri Pankov
77503609a9SYuri Pankovinclude		$(SRC)/data/Makefile.targ
78