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