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