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