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