xref: /titanic_41/usr/src/uts/sun/sys/Makefile (revision d89fccd8788afe1e920f842edd883fe192a1b8fe)
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 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28# include global definitions
29include ../../../Makefile.master
30
31# NOTE: pm.h is not shipped.  It should be shipped when power management
32# is a real feature of Solaris.
33
34HDRS=  \
35aflt.h \
36avintr.h \
37bmac.h \
38bootconf.h		bpp_reg.h \
39bpp_var.h \
40bw2reg.h		bw2var.h \
41cg3var.h		\
42cg6fbc.h		cg6reg.h		cg6tec.h \
43cg6thc.h		cg6var.h \
44cms.h 			cursor_impl.h \
45dkmpio.h		dmaga.h	\
46eri.h			eri_common.h		eri_mac.h \
47eri_msg.h		eri_phy.h \
48fdreg.h			fdvar.h \
49hme.h			hme_mac.h \
50hme_phy.h		i82586.h \
51isdnio.h \
52mace.h \
53memfb.h			memreg.h		memvar.h \
54obpdefs.h		pixrect.h  \
55pr_impl_util.h		pr_planegroups.h \
56promif.h		promimpl.h \
57ramdac.h 		ser_async.h		ser_zscc.h \
58socalio.h		socalreg.h \
59stp4020_reg.h		stp4020_var.h \
60ttymux.h		ttymuxuser.h \
61zsdev.h
62
63CLOSED_HDRS= \
64socal_cq_defs.h		socalmap.h		socalvar.h
65
66AUDIOHDRS= \
67audio_4231.h \
68audio1575.h
69
70SCSIADHDRS= \
71espcmd.h	espreg.h	espvar.h	fascmd.h	fasdma.h \
72fasreg.h	fasvar.h	ifpio.h
73
74CLOSED_SCSIAD = $(CLOSED)/uts/sun/sys/scsi/adapters
75
76CLOSED_SCSIADHDRS= \
77ifpcmd.h	ifpmail.h	ifpreg.h	ifpvar.h \
78ispcmd.h	ispmail.h	ispreg.h	ispvar.h \
79sfvar.h
80
81SCSITARGHDRS= \
82
83ROOTDIR=	$(ROOT)/usr/include/sys
84ROOTDIRS=	$(ROOTDIR) \
85		$(ROOTDIR)/audio \
86		$(ROOTDIR)/scsi/adapters \
87		$(ROOTDIR)/scsi/targets
88
89ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%)
90$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(ROOTDIR)/%)
91ROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
92ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%)
93ROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
94$(CLOSED_BUILD)ROOTSCSIADHDRS += \
95	$(CLOSED_SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
96ROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%)
97
98
99# install rules
100$(ROOTDIR)/%: %
101	$(INS.file)
102
103$(ROOTDIR)/%: $(CLOSED)/uts/sun/sys/%
104	$(INS.file)
105
106$(ROOTDIR)/audio/%: audio/%
107	$(INS.file)
108
109$(ROOTDIR)/scsi/adapters/%: scsi/adapters/%
110	$(INS.file)
111
112$(ROOTDIR)/scsi/adapters/%: $(CLOSED_SCSIAD)/%
113	$(INS.file)
114
115$(ROOTDIR)/scsi/targets/%: scsi/targets/%
116	$(INS.file)
117
118# check files really don't exist
119
120audio/%.check:		audio/%.h
121	$(DOT_H_CHECK)
122
123scsi/adapters/%.check:	scsi/adapters/%.h
124	$(DOT_H_CHECK)
125
126scsi/targets/%.check:	scsi/targets/%.h
127	$(DOT_H_CHECK)
128
129CHECKHDRS= \
130	$(HDRS:%.h=%.check) \
131	$(AUDIOHDRS:%.h=audio/%.check) \
132	$(FCHDRS:%.h=fc4/%.check) \
133	$(SCSIADHDRS:%.h=scsi/adapters/%.check) \
134	$(SCSITARGHDRS:%.h=scsi/targets/%.check)
135
136$(CLOSED_BUILD)CHECKHDRS += \
137	$(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun/sys/%.check) \
138	$(CLOSED_SCSIADHDRS:%.h=$(CLOSED_SCSIAD)/%.check)
139
140# headers which won't quite meet the standards...
141#
142# devops.h has a macro where the formal parameters to the macro are greater
143# than 80 characters.  cpp (or the equivalent built into acomp) does not allow
144# continuation line breaks in the formal parameter list.  This could be fixed
145# by giving shorter names to the formal parameters, but the right fix is to
146# fix cpp.  (Also, /* CSTYLED */ doesn't seem to fix this.
147#
148devops.check    := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
149
150.KEEP_STATE:
151
152.PARALLEL:	$(CHECKHDRS) $(ROOTHDRS) $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
153		$(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTXHDRS) \
154		$(ROOTFCHDRS)
155
156install_h: 	$(ROOTDIRS) .WAIT $(ROOTHDRS) \
157		$(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
158		$(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTFCHDRS)
159
160$(ROOTDIRS):
161	$(INS.dir)
162
163check:	$(CHECKHDRS)
164