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