xref: /titanic_50/usr/src/uts/sun/sys/Makefile (revision fef1e07ef354c2dcda4dc397c33f5a5532432c7a)
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 2006 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 \
59socal_cq_defs.h		socalmap.h		socalvar.h \
60stp4020_reg.h		stp4020_var.h \
61ttymux.h		ttymuxuser.h \
62zsdev.h
63
64AUDIOHDRS= \
65audio_4231.h \
66audio1575.h
67
68SCSIADHDRS= \
69espcmd.h	espreg.h	espvar.h	fascmd.h	fasdma.h \
70fasreg.h	fasvar.h	ifpio.h
71
72CLOSED_SCSIAD = $(CLOSED)/uts/sun/sys/scsi/adapters
73
74CLOSED_SCSIADHDRS= \
75ifpcmd.h	ifpmail.h	ifpreg.h	ifpvar.h \
76ispcmd.h	ispmail.h	ispreg.h	ispvar.h \
77sfvar.h
78
79SCSITARGHDRS= \
80
81ROOTDIR=	$(ROOT)/usr/include/sys
82ROOTDIRS=	$(ROOTDIR) \
83		$(ROOTDIR)/audio \
84		$(ROOTDIR)/scsi/adapters \
85		$(ROOTDIR)/scsi/targets
86
87ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%)
88$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(ROOTDIR)/%)
89ROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
90ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%)
91ROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
92$(CLOSED_BUILD)ROOTSCSIADHDRS += \
93	$(CLOSED_SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
94ROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%)
95
96
97# install rules
98$(ROOTDIR)/%: %
99	$(INS.file)
100
101$(ROOTDIR)/%: $(CLOSED)/uts/sun/sys/%
102	$(INS.file)
103
104$(ROOTDIR)/audio/%: audio/%
105	$(INS.file)
106
107$(ROOTDIR)/scsi/adapters/%: scsi/adapters/%
108	$(INS.file)
109
110$(ROOTDIR)/scsi/adapters/%: $(CLOSED_SCSIAD)/%
111	$(INS.file)
112
113$(ROOTDIR)/scsi/targets/%: scsi/targets/%
114	$(INS.file)
115
116# check files really don't exist
117
118audio/%.check:		audio/%.h
119	$(DOT_H_CHECK)
120
121scsi/adapters/%.check:	scsi/adapters/%.h
122	$(DOT_H_CHECK)
123
124scsi/targets/%.check:	scsi/targets/%.h
125	$(DOT_H_CHECK)
126
127CHECKHDRS= \
128	$(HDRS:%.h=%.check) \
129	$(AUDIOHDRS:%.h=audio/%.check) \
130	$(FCHDRS:%.h=fc4/%.check) \
131	$(SCSIADHDRS:%.h=scsi/adapters/%.check) \
132	$(SCSITARGHDRS:%.h=scsi/targets/%.check)
133
134$(CLOSED_BUILD)CHECKHDRS += \
135	$(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun/sys/%.check) \
136	$(CLOSED_SCSIADHDRS:%.h=$(CLOSED_SCSIAD)/%.check)
137
138# headers which won't quite meet the standards...
139#
140# devops.h has a macro where the formal parameters to the macro are greater
141# than 80 characters.  cpp (or the equivalent built into acomp) does not allow
142# continuation line breaks in the formal parameter list.  This could be fixed
143# by giving shorter names to the formal parameters, but the right fix is to
144# fix cpp.  (Also, /* CSTYLED */ doesn't seem to fix this.
145#
146devops.check    := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
147
148.KEEP_STATE:
149
150.PARALLEL:	$(CHECKHDRS) $(ROOTHDRS) $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
151		$(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTXHDRS) \
152		$(ROOTFCHDRS)
153
154install_h: 	$(ROOTDIRS) .WAIT $(ROOTHDRS) \
155		$(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
156		$(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTFCHDRS)
157
158$(ROOTDIRS):
159	$(INS.dir)
160
161check:	$(CHECKHDRS)
162