xref: /titanic_51/usr/src/uts/sun4u/sys/Makefile (revision dd4eeefdb8e4583c47e28a7f315db6087931ef06)
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#ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# uts/sun4u/sys/Makefile
28#
29UTSBASE	= ../..
30
31#
32# include global definitions
33#
34include ../Makefile.sun4u
35
36#
37# Override defaults.
38#
39FILEMODE	 = 644
40GROUP = bin
41
42SUN4_HDRS=			\
43	async.h			\
44	clock.h			\
45	cmp.h			\
46	cpc_ultra.h		\
47	cpu_sgnblk_defs.h 	\
48	ddi_subrdefs.h		\
49	dvma.h			\
50	eeprom.h		\
51	errclassify.h		\
52	fcode.h			\
53	fc_plat.h		\
54	idprom.h		\
55	intr.h			\
56	intreg.h		\
57	ivintr.h		\
58	memlist_plat.h  	\
59	memnode.h		\
60	nexusdebug.h		\
61	prom_debug.h		\
62	scb.h			\
63	sun4asi.h		\
64	tod.h			\
65	trapstat.h		\
66	vis.h			\
67	vm_machparam.h		\
68	x_call.h		\
69	xc_impl.h		\
70	zsmach.h
71
72$(CLOSED_BUILD)CLOSED_SUN4_HDRS=	\
73	memtestio.h
74
75HDRS=	\
76	cheetahregs.h		\
77	cpr_impl.h		\
78	cpu_impl.h		\
79	ecc_kstat.h		\
80	envctrl.h		\
81	envctrl_gen.h		\
82	envctrl_ue250.h		\
83	envctrl_ue450.h		\
84	gpio_87317.h		\
85	iocache.h		\
86	iommu.h			\
87	machasi.h		\
88	machclock.h		\
89	machcpuvar.h		\
90	machparam.h		\
91	machsystm.h		\
92	machthread.h		\
93	mmu.h			\
94	opl_module.h		\
95	prom_plat.h		\
96	pte.h			\
97	sbd_ioctl.h		\
98	spitregs.h		\
99	starfire.h		\
100	sysioerr.h		\
101	sysiosbus.h		\
102	todmostek.h		\
103	traptrace.h
104
105$(CLOSED_BUILD)CLOSED_HDRS=	\
106	memtestio_ch.h		\
107	memtestio_chp.h		\
108	memtestio_ja.h		\
109	memtestio_jg.h		\
110	memtestio_oc.h		\
111	memtestio_pn.h		\
112	memtestio_sf.h		\
113	memtestio_sr.h		\
114	memtestio_u.h
115
116DMFEHDRS =	dmfe.h dmfe_impl.h miiregs.h
117
118ROOTDMFEDIR = $(ROOT)/usr/include/sys
119
120ROOTDMFEHDRS = $(DMFEHDRS:%=$(ROOTDMFEDIR)/%)
121
122$(CLOSED_BUILD)CLOSED_I2CHDRS =	clients/scmi2c.h
123
124I2CHDRS =	clients/max1617.h misc/i2c_svc.h clients/i2c_client.h	\
125		clients/hpc3130.h clients/lm75.h	\
126		clients/pcf8591.h clients/ssc050.h $(CLOSED_I2CHDRS)
127
128I2C_DIRS=	clients misc
129USR_PSM_ISYS_I2C_ROOT=	$(USR_PSM_ISYS_DIR)/i2c
130USR_PSM_ISYS_I2C_DIRS=	$(USR_PSM_ISYS_I2C_ROOT) \
131			$(I2C_DIRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
132
133ROOTI2CHDRS=		$(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
134
135MONHDRS=
136#MONHDRS=	eeprom.h    idprom.h    keyboard.h  password.h
137
138USR_PSM_MON_DIR=	$(USR_PSM_ISYS_DIR)/mon
139
140ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
141$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
142
143SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
144$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
145
146ROOTMONHDRS=		$(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
147
148ROOTDIR=		$(ROOT)/usr/share/src
149ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
150
151ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
152LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
153
154CHECKHDRS=		$(HDRS:%.h=%.check) \
155			$(MONHDRS:%.h=mon/%.check) \
156			$(SUN4_HDRS:%.h=%.cmncheck)
157
158$(CLOSED_BUILD)CHECKHDRS += $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun4u/sys/%.check)
159$(CLOSED_BUILD)CHECKHDRS += \
160		$(CLOSED_I2CHDRS:%.h=$(CLOSED)/uts/sun4u/sys/i2c/%.check)
161
162.KEEP_STATE:
163
164.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
165
166install_h: $(ROOTDIRS) $(USR_PSM_ISYS_I2C_DIRS) $(ROOTDMFEDIR) .WAIT \
167		$(ROOTHDRS) $(ROOTI2CHDRS) \
168		$(ROOTMONHDRS) $(ROOTDMFEHDRS) \
169		$(SUN4_ROOTHDRS) $(ROOTLINK)
170
171check:	$(CHECKHDRS)
172
173#
174# install rules
175#
176$(USR_PSM_MON_DIR):	$(USR_PSM_ISYS_DIR)
177	$(INS.dir.root.bin)
178
179$(USR_PSM_ISYS_I2C_DIRS):
180	$(INS.dir.root.bin)
181
182$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4u/sys/% $(USR_PSM_ISYS_DIR)
183	$(INS.file)
184
185$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
186	$(INS.file)
187
188$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
189	$(INS.file)
190
191$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
192	$(INS.file)
193
194$(USR_PSM_MON_DIR)/%:	mon/% $(USR_PSM_MON_DIR)
195	$(INS.file)
196
197$(ROOTDMFEDIR)/%: % $(ROOTDMFEDIR)
198	$(INS.file)
199
200$(ROOTDMFEDIR):
201	$(INS.dir.root.bin)
202
203$(ROOTDIRS):
204	$(INS.dir.root.bin)
205
206# -r because this used to be a directory and is now a link.
207$(ROOTLINK):	$(ROOTDIRS)
208	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@ $(CHOWNLINK) $(CHGRPLINK)
209
210mon/%.check:	mon/%.h
211	$(DOT_H_CHECK)
212
213%.check:	../../sfmmu/sys/%.h
214	$(DOT_H_CHECK)
215%.cmncheck:	../../sun4/sys/%.h
216	$(DOT_H_CHECK)
217
218FRC:
219
220include ../../Makefile.targ
221