xref: /titanic_41/usr/src/data/hwdata/Makefile (revision 9f390783e179fe384a3fc7c8b8bb6a9b7c29eb50)
1*9f390783SYuri Pankov#
2*9f390783SYuri Pankov# CDDL HEADER START
3*9f390783SYuri Pankov#
4*9f390783SYuri Pankov# The contents of this file are subject to the terms of the
5*9f390783SYuri Pankov# Common Development and Distribution License (the "License").
6*9f390783SYuri Pankov# You may not use this file except in compliance with the License.
7*9f390783SYuri Pankov#
8*9f390783SYuri Pankov# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*9f390783SYuri Pankov# or http://www.opensolaris.org/os/licensing.
10*9f390783SYuri Pankov# See the License for the specific language governing permissions
11*9f390783SYuri Pankov# and limitations under the License.
12*9f390783SYuri Pankov#
13*9f390783SYuri Pankov# When distributing Covered Code, include this CDDL HEADER in each
14*9f390783SYuri Pankov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*9f390783SYuri Pankov# If applicable, add the following below this CDDL HEADER, with the
16*9f390783SYuri Pankov# fields enclosed by brackets "[]" replaced with your own identifying
17*9f390783SYuri Pankov# information: Portions Copyright [yyyy] [name of copyright owner]
18*9f390783SYuri Pankov#
19*9f390783SYuri Pankov# CDDL HEADER END
20*9f390783SYuri Pankov#
21*9f390783SYuri Pankov
22*9f390783SYuri Pankov#
23*9f390783SYuri Pankov# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24*9f390783SYuri Pankov# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
25*9f390783SYuri Pankov#
26*9f390783SYuri Pankov
27*9f390783SYuri Pankovinclude		$(SRC)/data/Makefile.data
28*9f390783SYuri Pankov
29*9f390783SYuri PankovHWDATA=		pci.ids usb.ids
30*9f390783SYuri PankovHWDATADIR=	$(ROOT)/usr/share/hwdata
31*9f390783SYuri PankovROOTHWDATA=	$(HWDATA:%=$(HWDATADIR)/%)
32*9f390783SYuri Pankov
33*9f390783SYuri PankovCLOBBERFILES=	THIRDPARTYLICENSE.pciids
34*9f390783SYuri Pankov
35*9f390783SYuri Pankov$(ROOTHWDATA):=	FILEMODE = 444
36*9f390783SYuri Pankov
37*9f390783SYuri Pankovall install:	THIRDPARTYLICENSE.pciids
38*9f390783SYuri Pankov
39*9f390783SYuri PankovTHIRDPARTYLICENSE.pciids: pci.ids THIRDPARTYLICENSE.pciids.tmpl
40*9f390783SYuri Pankov		$(RM) $@
41*9f390783SYuri Pankov		$(SED) -e '/^$$/,$$ d' < pci.ids > $@
42*9f390783SYuri Pankov		$(CAT) THIRDPARTYLICENSE.pciids.tmpl >> $@
43*9f390783SYuri Pankov
44*9f390783SYuri Pankovinstall:	$(ROOTHWDATA)
45*9f390783SYuri Pankov
46*9f390783SYuri Pankov$(HWDATADIR)/%: %
47*9f390783SYuri Pankov		$(INS.file)
48*9f390783SYuri Pankov
49*9f390783SYuri Pankovclean:
50*9f390783SYuri Pankov
51*9f390783SYuri Pankov# The "update" target family allows a simple pull-from-the-source update.
52*9f390783SYuri Pankov# One can then use revision-control diffs to see what actually changed.
53*9f390783SYuri Pankovupdate:		usb.update pci.update
54*9f390783SYuri Pankov
55*9f390783SYuri Pankov# URLs for PCI IDs and USB IDs
56*9f390783SYuri PankovPCIURL=		http://pci-ids.ucw.cz/v2.2/pci.ids
57*9f390783SYuri PankovUSBURL=		http://www.linux-usb.org/usb.ids
58*9f390783SYuri Pankov
59*9f390783SYuri Pankov# These could move into Makefile.master
60*9f390783SYuri PankovURL_FETCH=	wget
61*9f390783SYuri PankovURL_FETCHARGS=
62*9f390783SYuri Pankov
63*9f390783SYuri Pankovpci.update:
64*9f390783SYuri Pankov		$(RM) pci.ids
65*9f390783SYuri Pankov		$(URL_FETCH) $(URL_FETCHARGS) $(PCIURL)
66*9f390783SYuri Pankov
67*9f390783SYuri Pankovusb.update:
68*9f390783SYuri Pankov		$(RM) usb.ids
69*9f390783SYuri Pankov		$(URL_FETCH) $(URL_FETCHARGS) $(USBURL)
70*9f390783SYuri Pankov
71*9f390783SYuri Pankovinclude		$(SRC)/data/Makefile.targ
72