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 2014 Garrett D'Amore <garrett@damore.org>
25# Copyright 2016 Nexenta Systems, Inc.
26# Copyright 2019 Joyent, Inc.
27#
28
29# Common definitions for open and closed headers.
30
31# check files really don't exist
32
33audio/%.check:	audio/%.h
34	$(DOT_H_CHECK)
35
36av/%.check:	av/%.h
37	$(DOT_H_CHECK)
38
39fm/%.check:     fm/%.h
40	$(DOT_H_CHECK)
41
42fm/cpu/%.check:	fm/cpu/%.h
43	$(DOT_H_CHECK)
44
45fm/fs/%.check:	fm/fs/%.h
46	$(DOT_H_CHECK)
47
48fm/io/%.check:	fm/io/%.h
49	$(DOT_H_CHECK)
50
51fs/%.check:	fs/%.h
52	$(DOT_H_CHECK)
53
54ib/%.check:		ib/%.h
55	$(DOT_H_CHECK)
56
57ib/clients/ibd/%.check:	ib/clients/ibd/%.h
58	$(DOT_H_CHECK)
59
60ib/clients/of/%.check:		ib/clients/of/%.h
61	$(DOT_H_CHECK)
62
63ib/clients/of/rdma/%.check:		ib/clients/of/rdma/%.h
64	$(DOT_H_CHECK)
65
66ib/clients/of/sol_ofs/%.check:		ib/clients/of/sol_ofs/%.h
67	$(DOT_H_CHECK)
68
69ib/clients/of/sol_uverbs/%.check:	ib/clients/of/sol_uverbs/%.h
70	$(DOT_H_CHECK)
71
72ib/clients/of/sol_umad/%.check:		ib/clients/of/sol_umad/%.h
73	$(DOT_H_CHECK)
74
75ib/clients/of/sol_ucma/%.check:		ib/clients/of/sol_ucma/%.h
76	$(DOT_H_CHECK)
77
78ib/ibtl/%.check:	ib/ibtl/%.h
79	$(DOT_H_CHECK)
80
81ib/ibtl/impl/%.check:	ib/ibtl/impl/%.h
82	$(DOT_H_CHECK)
83
84ib/ibnex/%.check:	ib/ibnex/%.h
85	$(DOT_H_CHECK)
86
87ib/mgt/%.check:	ib/mgt/%.h
88	$(DOT_H_CHECK)
89
90ib/mgt/ibmf/%.check:	ib/mgt/ibmf/%.h
91	$(DOT_H_CHECK)
92
93ib/adapters/tavor/%.check:	ib/adapters/tavor/%.h
94	$(DOT_H_CHECK)
95
96ib/adapters/hermon/%.check:	ib/adapters/hermon/%.h
97	$(DOT_H_CHECK)
98
99ib/adapters/%.check:	ib/adapters/%.h
100	$(DOT_H_CHECK)
101
102idm/%.check:		idm/%.h
103	$(DOT_H_CHECK)
104
105iscsit/%.check:		iscsit/%.h
106	$(DOT_H_CHECK)
107
108nvme/%.check:		nvme/%.h
109	$(DOT_H_CHECK)
110
111scsi/%.check:		scsi/%.h
112	$(DOT_H_CHECK)
113
114scsi/conf/%.check:	scsi/conf/%.h
115	$(DOT_H_CHECK)
116
117scsi/generic/%.check:	scsi/generic/%.h
118	$(DOT_H_CHECK)
119
120scsi/impl/%.check:	scsi/impl/%.h
121	$(DOT_H_CHECK)
122
123scsi/targets/%.check:	scsi/targets/%.h
124	$(DOT_H_CHECK)
125
126scsi/adapters/%.check:	scsi/adapters/%.h
127	$(DOT_H_CHECK)
128
129sdcard/%.check:		sdcard/%.h
130	$(DOT_H_CHECK)
131
132sysevent/%.check:     sysevent/%.h
133	$(DOT_H_CHECK)
134
135contract/%.check:     contract/%.h
136	$(DOT_H_CHECK)
137
138usb/%.check:		usb/%.h
139	$(DOT_H_CHECK)
140
141usb/clients/audio/%.check:  usb/clients/audio/%.h
142	$(DOT_H_CHECK)
143
144usb/hubd/%.check:	usb/hubd/%.h
145	$(DOT_H_CHECK)
146
147usb/clients/hid/%.check:	usb/clients/hid/%.h
148	$(DOT_H_CHECK)
149
150usb/clients/mass_storage/%.check:	usb/clients/mass_storage/%.h
151	$(DOT_H_CHECK)
152
153usb/clients/printer/%.check:  usb/clients/printer/%.h
154	$(DOT_H_CHECK)
155
156usb/clients/ccid/%.check:	usb/clients/ccid/%.h
157	$(DOT_H_CHECK)
158
159usb/clients/usbcdc/%.check:	usb/clients/usbcdc/%.h
160	$(DOT_H_CHECK)
161
162usb/clients/video/usbvc/%.check:  usb/clients/video/usbvc/%.h
163	$(DOT_H_CHECK)
164
165usb/clients/usbinput/usbwcm/%.check:	usb/clients/usbinput/usbwcm/%.h
166	$(DOT_H_CHECK)
167
1681394/%.check:         1394/%.h
169	$(DOT_H_CHECK)
170
171rsm/%.check:	rsm/%.h
172	$(DOT_H_CHECK)
173
174tsol/%.check:	tsol/%.h
175	$(DOT_H_CHECK)
176
177ROOTDIR=	$(ROOT)/usr/include/sys
178
179ROOTDIRS=			\
180	$(ROOTDIR)		\
181	$(ROOTDIR)/audio	\
182	$(ROOTDIR)/av		\
183	$(ROOTDIR)/dktp		\
184	$(ROOTDIR)/hotplug	\
185	$(ROOTDIR)/hotplug/pci	\
186	$(ROOTDIR)/crypto	\
187	$(ROOTDIR)/dcam		\
188	$(ROOTDIR)/iso		\
189	$(ROOTDIR)/fc4		\
190	$(ROOTDIR)/fibre-channel    \
191	$(ROOTDIR)/fibre-channel/impl	\
192	$(ROOTDIR)/fibre-channel/ulp	\
193	$(ROOTDIR)/fm		\
194	$(ROOTDIR)/fm/cpu	\
195	$(ROOTDIR)/fm/fs	\
196	$(ROOTDIR)/fm/io	\
197	$(ROOTDIR)/fs		\
198	$(ROOTDIR)/ib		\
199	$(ROOTDIR)/ib/adapters/tavor	\
200	$(ROOTDIR)/ib/adapters/hermon	\
201	$(ROOTDIR)/ib/adapters	\
202	$(ROOTDIR)/ib/ibtl	\
203	$(ROOTDIR)/ib/ibtl/impl	\
204	$(ROOTDIR)/ib/mgt	\
205	$(ROOTDIR)/ib/mgt/ibmf	\
206	$(ROOTDIR)/ib/ibnex	\
207	$(ROOTDIR)/ib/clients/ibd \
208	$(ROOTDIR)/ib/clients/of	\
209	$(ROOTDIR)/ib/clients/of/rdma	\
210	$(ROOTDIR)/ib/clients/of/sol_ofs	\
211	$(ROOTDIR)/ib/clients/of/sol_uverbs	\
212	$(ROOTDIR)/ib/clients/of/sol_umad	\
213	$(ROOTDIR)/ib/clients/of/sol_ucma	\
214	$(ROOTDIR)/idm		\
215	$(ROOTDIR)/iscsit	\
216	$(ROOTDIR)/nvme		\
217	$(ROOTDIR)/sata		\
218	$(ROOTDIR)/scsi		\
219	$(ROOTDIR)/scsi/adapters	\
220	$(ROOTDIR)/scsi/conf	\
221	$(ROOTDIR)/scsi/generic	\
222	$(ROOTDIR)/scsi/impl	\
223	$(ROOTDIR)/scsi/targets	\
224	$(ROOTDIR)/sdcard	\
225	$(ROOTDIR)/sysevent     \
226	$(ROOTDIR)/contract     \
227	$(ROOTDIR)/usb		\
228	$(ROOTDIR)/usb/hubd	\
229	$(ROOTDIR)/usb/clients	\
230	$(ROOTDIR)/usb/clients/audio  \
231	$(ROOTDIR)/usb/clients/hid \
232	$(ROOTDIR)/usb/clients/mass_storage	\
233	$(ROOTDIR)/usb/clients/printer  \
234	$(ROOTDIR)/usb/clients/usbcdc  \
235	$(ROOTDIR)/usb/clients/video/usbvc  \
236	$(ROOTDIR)/usb/clients/usbinput/usbwcm \
237	$(ROOTDIR)/usb/clients/ccid \
238	$(ROOTDIR)/usb/clients/ugen  \
239	$(ROOTDIR)/1394         \
240	$(ROOTDIR)/rsm		\
241	$(ROOTDIR)/tsol		\
242	$($(MACH)_ROOTDIRS)
243
244
245ROOTHDRS=				\
246	$($(MACH)_HDRS:%=$(ROOTDIR)/%)	\
247	$(HDRS:%=$(ROOTDIR)/%)
248
249ROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
250
251ROOTAVHDRS= $(AVHDRS:%=$(ROOTDIR)/av/%)
252
253ROOTCRYPTOHDRS= $(CRYPTOHDRS:%=$(ROOTDIR)/crypto/%)
254
255ROOTDCAMHDRS= $(DCAMHDRS:%=$(ROOTDIR)/dcam/%)
256
257ROOTIBHDRS= $(IBHDRS:%=$(ROOTDIR)/ib/%)
258ROOTIBDHDRS= $(IBDHDRS:%=$(ROOTDIR)/ib/clients/ibd/%)
259ROOTIBTLHDRS= $(IBTLHDRS:%=$(ROOTDIR)/ib/ibtl/%)
260ROOTIBTLIMPLHDRS= $(IBTLIMPLHDRS:%=$(ROOTDIR)/ib/ibtl/impl/%)
261ROOTIBNEXHDRS= $(IBNEXHDRS:%=$(ROOTDIR)/ib/ibnex/%)
262ROOTIBMGTHDRS= $(IBMGTHDRS:%=$(ROOTDIR)/ib/mgt/%)
263ROOTIBMFHDRS= $(IBMFHDRS:%=$(ROOTDIR)/ib/mgt/ibmf/%)
264ROOTOFHDRS= $(OFHDRS:%=$(ROOTDIR)/ib/clients/of/%)
265ROOTRDMAHDRS= $(RDMAHDRS:%=$(ROOTDIR)/ib/clients/of/rdma/%)
266ROOTSOL_OFSHDRS= $(SOL_OFSHDRS:%=$(ROOTDIR)/ib/clients/of/sol_ofs/%)
267ROOTSOL_UVERBSHDRS= $(SOL_UVERBSHDRS:%=$(ROOTDIR)/ib/clients/of/sol_uverbs/%)
268ROOTSOL_UMADHDRS= $(SOL_UMADHDRS:%=$(ROOTDIR)/ib/clients/of/sol_umad/%)
269ROOTSOL_UCMAHDRS= $(SOL_UCMAHDRS:%=$(ROOTDIR)/ib/clients/of/sol_ucma/%)
270ROOTTAVORHDRS= $(TAVORHDRS:%=$(ROOTDIR)/ib/adapters/tavor/%)
271ROOTHERMONHDRS= $(HERMONHDRS:%=$(ROOTDIR)/ib/adapters/hermon/%)
272ROOTMLNXHDRS= $(MLNXHDRS:%=$(ROOTDIR)/ib/adapters/%)
273
274ROOTIDMHDRS= $(IDMHDRS:%=$(ROOTDIR)/idm/%)
275ROOTISCSITHDRS= $(ISCSITHDRS:%=$(ROOTDIR)/iscsit/%)
276
277ROOTISOHDRS= $(ISOHDRS:%=$(ROOTDIR)/iso/%)
278
279ROOTFMHDRS= $(FMHDRS:%=$(ROOTDIR)/fm/%)
280ROOTFMCPUHDRS= $(FMCPUHDRS:%=$(ROOTDIR)/fm/cpu/%)
281ROOTFMIOHDRS= $(FMIOHDRS:%=$(ROOTDIR)/fm/io/%)
282ROOTFMFSHDRS= $(FMFSHDRS:%=$(ROOTDIR)/fm/fs/%)
283
284ROOTFSHDRS= $(FSHDRS:%=$(ROOTDIR)/fs/%)
285
286ROOTNVMEHDRS= $(NVMEHDRS:%=$(ROOTDIR)/nvme/%)
287
288ROOTSCSIHDRS= $(SCSIHDRS:%=$(ROOTDIR)/scsi/%)
289ROOTSATAGENHDRS= $(SATAGENHDRS:%=$(ROOTDIR)/sata/%)
290ROOTSCSICONFHDRS= $(SCSICONFHDRS:%=$(ROOTDIR)/scsi/conf/%)
291ROOTSCSIGENHDRS= $(SCSIGENHDRS:%=$(ROOTDIR)/scsi/generic/%)
292ROOTSCSIIMPLHDRS= $(SCSIIMPLHDRS:%=$(ROOTDIR)/scsi/impl/%)
293ROOTSCSITARGETSHDRS= $(SCSITARGETSHDRS:%=$(ROOTDIR)/scsi/targets/%)
294ROOTSCSIADHDRS= $(SCSICADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
295ROOTSCSIVHCIHDRS= $(SCSIVHCIHDRS:%=$(ROOTDIR)/scsi/adapters/%)
296ROOTSCSIISCSIHDRS= $(SCSIISCSIHDRS:%=$(ROOTDIR)/scsi/adapters/%)
297
298ROOTFC4HDRS= $(FC4HDRS:%=$(ROOTDIR)/fc4/%)
299ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fibre-channel/%)
300ROOTFCIMPLHDRS= $(FCIMPLHDRS:%=$(ROOTDIR)/fibre-channel/impl/%)
301ROOTFCULPHDRS= $(FCULPHDRS:%=$(ROOTDIR)/fibre-channel/ulp/%)
302
303ROOTSDCARDHDRS= $(SDCARDHDRS:%=$(ROOTDIR)/sdcard/%)
304
305ROOTSYSEVENTHDRS= $(SYSEVENTHDRS:%=$(ROOTDIR)/sysevent/%)
306ROOTCONTRACTHDRS= $(CONTRACTHDRS:%=$(ROOTDIR)/contract/%)
307
308ROOTXHDRS= $(XHDRS:%=$(ROOTDIR)/%)
309
310ROOTUSBHDRS= $(USBHDRS:%=$(ROOTDIR)/usb/%)
311ROOTUSBAUDHDRS= $(USBAUDHDRS:%=$(ROOTDIR)/usb/clients/audio/%)
312ROOTUSBHUBDHDRS= $(USBHUBDHDRS:%=$(ROOTDIR)/usb/hubd/%)
313ROOTUSBHIDHDRS = $(USBHIDHDRS:%=$(ROOTDIR)/usb/clients/hid/%)
314ROOTUSBMSHDRS= $(USBMSHDRS:%=$(ROOTDIR)/usb/clients/mass_storage/%)
315ROOTUSBPRNHDRS= $(USBPRNHDRS:%=$(ROOTDIR)/usb/clients/printer/%)
316ROOTUSBCDCHDRS= $(USBCDCHDRS:%=$(ROOTDIR)/usb/clients/usbcdc/%)
317ROOTUSBVIDHDRS= $(USBVIDHDRS:%=$(ROOTDIR)/usb/clients/video/usbvc/%)
318ROOTUSBWCMHDRS= $(USBWCMHDRS:%=$(ROOTDIR)/usb/clients/usbinput/usbwcm/%)
319ROOTUSBCCIDHDRS= $(USBCCIDHDRS:%=$(ROOTDIR)/usb/clients/ccid/%)
320ROOTUGENHDRS= $(UGENHDRS:%=$(ROOTDIR)/usb/clients/ugen/%)
321
322ROOT1394HDRS= $(I1394HDRS:%=$(ROOTDIR)/1394/%)
323
324ROOTRSMHDRS= $(RSMHDRS:%=$(ROOTDIR)/rsm/%)
325
326ROOTDKTPHDRS= $(DKTPHDRS:%=$(ROOTDIR)/dktp/%)
327ROOTPCHDRS= $(PCHDRS:%=$(ROOTDIR)/%)
328ROOTHOTPLUGHDRS= $(HOTPLUGHDRS:%=$(ROOTDIR)/hotplug/%)
329ROOTHOTPLUGPCIHDRS= $(HOTPLUGPCIHDRS:%=$(ROOTDIR)/hotplug/pci/%)
330
331ROOTTSOLHDRS= $(TSOLHDRS:%=$(ROOTDIR)/tsol/%)
332
333sparc_ROOTHDRS=	\
334		$(ROOTUSBHDRS) $(ROOTUSBHUBDHDRS) \
335		$(ROOTUSBAUDHDRS) $(ROOTUSBHIDHDRS) $(ROOTUSBMSHDRS) \
336		$(ROOTUSBPRNHDRS) $(ROOTUGENHDRS) $(ROOTUSBVIDHDRS)
337
338i386_ROOTHDRS=	$(ROOTPCHDRS) \
339		$(ROOTHOTPLUGHDRS) \
340		$(ROOTHOTPLUGPCIHDRS)
341
342# install rules
343$(ROOTDIR)/%: %
344	$(INS.file)
345
346$(ROOTDIR)/crypto/%: crypto/%
347	$(INS.file)
348
349$(ROOTDIR)/fc4/%:		fc4/%
350	$(INS.file)
351
352$(ROOTDIR)/fibre-channel/%:	fibre-channel/%
353	$(INS.file)
354
355$(ROOTDIR)/fibre-channel/impl/%:	fibre-channel/impl/%
356	$(INS.file)
357
358$(ROOTDIR)/fibre-channel/ulp/:	fibre-channel/ulp/%
359	$(INS.file)
360
361$(ROOTDIR)/fm/%:                fm/%
362	$(INS.file)
363
364$(ROOTDIR)/fm/cpu/%:                fm/cpu/%
365	$(INS.file)
366
367$(ROOTDIR)/fm/io/%:                fm/io/%
368	$(INS.file)
369
370$(ROOTDIR)/fs/%: fs/%
371	$(INS.file)
372
373$(ROOTDIR)/ib/%:		ib/%
374	$(INS.file)
375
376$(ROOTDIR)/ib/clients/ibd/%:	ib/clients/ibd/%
377	$(INS.file)
378
379$(ROOTDIR)/ib/clients/of/%:		of/%
380	$(INS.file)
381
382$(ROOTDIR)/ib/clients/of/rdma/%:	ib/clients/of/rdma/%
383	$(INS.file)
384
385$(ROOTDIR)/ib/clients/of/sol_ofs/%:	ib/clients/of/sol_ofs/%
386	$(INS.file)
387
388$(ROOTDIR)/ib/clients/of/sol_uverbs/%:	ib/clients/of/sol_uverbs/%
389	$(INS.file)
390
391$(ROOTDIR)/ib/clients/of/sol_umad/%:	ib/clients/of/sol_umad/%
392	$(INS.file)
393
394$(ROOTDIR)/ib/clients/of/sol_ucma/%:	ib/clients/of/sol_ucma/%
395	$(INS.file)
396
397$(ROOTDIR)/ib/ibtl/%:		ib/ibtl/%
398	$(INS.file)
399
400$(ROOTDIR)/ib/ibtl/impl/%:	ib/ibtl/impl/%
401	$(INS.file)
402
403$(ROOTDIR)/ib/ibnex/%:		ib/ibnex/%
404	$(INS.file)
405
406$(ROOTDIR)/ib/mgt/%:		ib/mgt/%
407	$(INS.file)
408
409$(ROOTDIR)/ib/mgt/ibmf/%:	ib/mgt/ibmf/%
410	$(INS.file)
411
412$(ROOTDIR)/ib/adapters/tavor/%:	ib/adapters/tavor/%
413	$(INS.file)
414
415$(ROOTDIR)/ib/adapters/hermon/%:	ib/adapters/hermon/%
416	$(INS.file)
417
418$(ROOTDIR)/ib/adapters/%:	ib/adapters/%
419	$(INS.file)
420
421$(ROOTDIR)/scsi/%:		scsi/%
422	$(INS.file)
423
424$(ROOTDIR)/scsi/conf/%:		scsi/conf/%
425	$(INS.file)
426
427$(ROOTDIR)/scsi/generic/%:	scsi/generic/%
428	$(INS.file)
429
430$(ROOTDIR)/scsi/impl/%:		scsi/impl/%
431	$(INS.file)
432
433$(ROOTDIR)/scsi/targets/%:	scsi/targets/%
434	$(INS.file)
435
436$(ROOTDIR)/scsi/adapters/%:	scsi/adapters/%
437	$(INS.file)
438
439$(ROOTDIR)/sdcard/%:		sdcard/%
440	$(INS.file)
441
442$(ROOTDIR)/sysevent/%:		sysevent/%
443	$(INS.file)
444
445$(ROOTDIR)/contract/%:		contract/%
446	$(INS.file)
447
448$(ROOTDIR)/usb/%:		usb/%
449	$(INS.file)
450
451$(ROOTDIR)/usb/hubd/%:		usb/hubd/%
452	$(INS.file)
453
454$(ROOTDIR)/usb/clients/hid/%:	usb/clients/hid/%
455	$(INS.file)
456
457$(ROOTDIR)/usb/clients/mass_storage/%:	usb/clients/mass_storage/%
458	$(INS.file)
459
460$(ROOTDIR)/dktp/%: dktp/%
461	$(INS.file)
462
463$(ROOTDIR)/1394/%:                    1394/%
464	$(INS.file)
465
466$(ROOTDIR)/rsm/%:	rsm/%
467	$(INS.file)
468
469$(ROOTDIR)/tsol/%:	tsol/%
470	$(INS.file)
471
472$(ROOTDIRS):
473	$(INS.dir)
474
475