xref: /titanic_41/usr/src/uts/sun/sys/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 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		dbriio.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 \
54mmcodecreg.h \
55obpdefs.h		pixrect.h  \
56pr_impl_util.h		pr_planegroups.h \
57promif.h		promimpl.h \
58ramdac.h 		ser_async.h		ser_zscc.h \
59socalvar.h		socalreg.h		socalmap.h \
60socalio.h 		socal_cq_defs.h \
61stp4020_reg.h		stp4020_var.h \
62ttymux.h		ttymuxuser.h \
63zsdev.h
64
65AUDIOHDRS= \
66audio_4231.h
67
68SCSIADHDRS= \
69espcmd.h	espreg.h	espvar.h	fascmd.h	fasdma.h \
70fasreg.h	fasvar.h	sfvar.h	\
71ifpcmd.h	ifpvar.h	ifpio.h		ifpmail.h	ifpreg.h \
72ispcmd.h	ispmail.h	ispreg.h	ispvar.h
73
74SCSITARGHDRS= \
75
76ROOTDIR=	$(ROOT)/usr/include/sys
77ROOTDIRS=	$(ROOTDIR) \
78		$(ROOTDIR)/audio \
79		$(ROOTDIR)/scsi/adapters \
80		$(ROOTDIR)/scsi/targets
81
82ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%)
83ROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
84ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%)
85ROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
86ROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%)
87
88
89# install rules
90$(ROOTDIR)/%: %
91	$(INS.file)
92
93$(ROOTDIR)/audio/%: audio/%
94	$(INS.file)
95
96$(ROOTDIR)/scsi/adapters/%: scsi/adapters/%
97	$(INS.file)
98
99$(ROOTDIR)/scsi/targets/%: scsi/targets/%
100	$(INS.file)
101
102# check files really don't exist
103
104audio/%.check:		audio/%.h
105	$(DOT_H_CHECK)
106
107scsi/adapters/%.check:	scsi/adapters/%.h
108	$(DOT_H_CHECK)
109
110scsi/targets/%.check:	scsi/targets/%.h
111	$(DOT_H_CHECK)
112
113CHECKHDRS= \
114	$(HDRS:%.h=%.check) \
115	$(AUDIOHDRS:%.h=audio/%.check) \
116	$(FCHDRS:%.h=fc4/%.check) \
117	$(SCSIADHDRS:%.h=scsi/adapters/%.check) \
118	$(SCSITARGHDRS:%.h=scsi/targets/%.check)
119
120
121# headers which won't quite meet the standards...
122#
123# devops.h has a macro where the formal parameters to the macro are greater
124# than 80 characters.  cpp (or the equivalent built into acomp) does not allow
125# continuation line breaks in the formal parameter list.  This could be fixed
126# by giving shorter names to the formal parameters, but the right fix is to
127# fix cpp.  (Also, /* CSTYLED */ doesn't seem to fix this.
128#
129devops.check    := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
130
131.KEEP_STATE:
132
133.PARALLEL:	$(CHECKHDRS) $(ROOTHDRS) $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
134		$(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTXHDRS) \
135		$(ROOTFCHDRS)
136
137install_h: 	$(ROOTDIRS) .WAIT $(ROOTHDRS) \
138		$(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
139		$(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTFCHDRS)
140
141$(ROOTDIRS):
142	$(INS.dir)
143
144check:	$(CHECKHDRS)
145