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