xref: /titanic_51/usr/src/uts/sun4u/sys/Makefile (revision 7950274e5799b56695a76f974ac361411ec2e515)
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 2006 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	idprom.h		\
54	intr.h			\
55	intreg.h		\
56	ivintr.h		\
57	memlist_plat.h  	\
58	memnode.h		\
59	nexusdebug.h		\
60	prom_debug.h		\
61	scb.h			\
62	sun4asi.h		\
63	tod.h			\
64	trapstat.h		\
65	vis.h			\
66	vm_machparam.h		\
67	x_call.h		\
68	xc_impl.h		\
69	zsmach.h
70
71$(CLOSED_BUILD)CLOSED_SUN4_HDRS=	\
72	memtestio.h
73
74HDRS=	\
75	cheetahregs.h		\
76	cpr_impl.h		\
77	ecc_kstat.h		\
78	envctrl.h		\
79	envctrl_gen.h		\
80	envctrl_ue250.h		\
81	envctrl_ue450.h		\
82	gpio_87317.h		\
83	fc_plat.h		\
84	iocache.h		\
85	iommu.h			\
86	machasi.h		\
87	machclock.h		\
88	machcpuvar.h		\
89	machparam.h		\
90	machsystm.h		\
91	machthread.h		\
92	mmu.h			\
93	prom_plat.h		\
94	pte.h			\
95	sbd_ioctl.h		\
96	spitregs.h		\
97	starfire.h		\
98	sysioerr.h		\
99	sysiosbus.h		\
100	todmostek.h		\
101	traptrace.h		\
102	us_drv.h		\
103	wci_cmmu.h		\
104	wci_common.h		\
105	wci_offsets.h		\
106	wci_regs.h		\
107	wrsm.h			\
108	wrsm_config.h		\
109	wrsm_plugin.h		\
110	wrsm_plat.h		\
111	wrsm_common.h		\
112	wrsm_types.h
113
114$(CLOSED_BUILD)CLOSED_HDRS=	\
115	memtestio_ch.h		\
116	memtestio_chp.h		\
117	memtestio_ja.h		\
118	memtestio_jg.h		\
119	memtestio_pn.h		\
120	memtestio_sf.h		\
121	memtestio_sr.h		\
122	memtestio_u.h
123
124DMFEHDRS =	dmfe.h dmfe_impl.h miiregs.h
125
126ROOTDMFEDIR = $(ROOT)/usr/include/sys
127
128ROOTDMFEHDRS = $(DMFEHDRS:%=$(ROOTDMFEDIR)/%)
129
130$(CLOSED_BUILD)CLOSED_I2CHDRS =	clients/scmi2c.h
131
132I2CHDRS =	clients/max1617.h misc/i2c_svc.h clients/i2c_client.h	\
133		clients/hpc3130.h clients/lm75.h	\
134		clients/pcf8591.h clients/ssc050.h $(CLOSED_I2CHDRS)
135
136I2C_DIRS=	clients misc
137USR_PSM_ISYS_I2C_ROOT=	$(USR_PSM_ISYS_DIR)/i2c
138USR_PSM_ISYS_I2C_DIRS=	$(USR_PSM_ISYS_I2C_ROOT) \
139			$(I2C_DIRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
140
141ROOTI2CHDRS=		$(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
142
143MONHDRS=
144#MONHDRS=	eeprom.h    idprom.h    keyboard.h  password.h
145
146USR_PSM_MON_DIR=	$(USR_PSM_ISYS_DIR)/mon
147
148ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
149$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
150
151SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
152$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
153
154ROOTMONHDRS=		$(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
155
156ROOTDIR=		$(ROOT)/usr/share/src
157ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
158
159ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
160LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
161
162CHECKHDRS=		$(HDRS:%.h=%.check) \
163			$(MONHDRS:%.h=mon/%.check) \
164			$(SUN4_HDRS:%.h=%.cmncheck)
165
166$(CLOSED_BUILD)CHECKHDRS += $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun4u/sys/%.check)
167$(CLOSED_BUILD)CHECKHDRS += \
168		$(CLOSED_I2CHDRS:%.h=$(CLOSED)/uts/sun4u/sys/i2c/%.check)
169
170.KEEP_STATE:
171
172.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
173
174install_h: $(ROOTDIRS) $(USR_PSM_ISYS_I2C_DIRS) $(ROOTDMFEDIR) .WAIT \
175		$(ROOTHDRS) $(ROOTI2CHDRS) \
176		$(ROOTMONHDRS) $(ROOTDMFEHDRS) \
177		$(SUN4_ROOTHDRS) $(ROOTLINK)
178
179check:	$(CHECKHDRS)
180
181#
182# install rules
183#
184$(USR_PSM_MON_DIR):	$(USR_PSM_ISYS_DIR)
185	$(INS.dir.root.bin)
186
187$(USR_PSM_ISYS_I2C_DIRS):
188	$(INS.dir.root.bin)
189
190$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4u/sys/% $(USR_PSM_ISYS_DIR)
191	$(INS.file)
192
193$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
194	$(INS.file)
195
196$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
197	$(INS.file)
198
199$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
200	$(INS.file)
201
202$(USR_PSM_MON_DIR)/%:	mon/% $(USR_PSM_MON_DIR)
203	$(INS.file)
204
205$(ROOTDMFEDIR)/%: % $(ROOTDMFEDIR)
206	$(INS.file)
207
208$(ROOTDMFEDIR):
209	$(INS.dir.root.bin)
210
211$(ROOTDIRS):
212	$(INS.dir.root.bin)
213
214# -r because this used to be a directory and is now a link.
215$(ROOTLINK):	$(ROOTDIRS)
216	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@ $(CHOWNLINK) $(CHGRPLINK)
217
218mon/%.check:	mon/%.h
219	$(DOT_H_CHECK)
220
221%.check:	../../sfmmu/sys/%.h
222	$(DOT_H_CHECK)
223%.cmncheck:	../../sun4/sys/%.h
224	$(DOT_H_CHECK)
225
226FRC:
227
228include ../../Makefile.targ
229