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