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