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