xref: /titanic_44/usr/src/uts/sun4u/sys/Makefile (revision 4468e2cfe87530e52052b7a809d4fdf877eabe25)
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
113I2CHDRS =	clients/max1617.h misc/i2c_svc.h clients/i2c_client.h	\
114		clients/hpc3130.h clients/lm75.h	\
115		clients/pcf8591.h clients/ssc050.h $(CLOSED_I2CHDRS)
116
117I2C_DIRS=	clients misc
118USR_PSM_ISYS_I2C_ROOT=	$(USR_PSM_ISYS_DIR)/i2c
119USR_PSM_ISYS_I2C_DIRS=	$(USR_PSM_ISYS_I2C_ROOT) \
120			$(I2C_DIRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
121
122ROOTI2CHDRS=		$(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
123
124MONHDRS=
125#MONHDRS=	eeprom.h    idprom.h    keyboard.h  password.h
126
127USR_PSM_MON_DIR=	$(USR_PSM_ISYS_DIR)/mon
128
129ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
130$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
131
132SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
133$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
134
135ROOTMONHDRS=		$(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
136
137ROOTDIR=		$(ROOT)/usr/share/src
138ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
139
140ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
141LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
142
143CHECKHDRS=		$(HDRS:%.h=%.check) \
144			$(MONHDRS:%.h=mon/%.check) \
145			$(SUN4_HDRS:%.h=%.cmncheck)
146
147$(CLOSED_BUILD)CHECKHDRS += $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun4u/sys/%.check)
148$(CLOSED_BUILD)CHECKHDRS += \
149		$(CLOSED_I2CHDRS:%.h=$(CLOSED)/uts/sun4u/sys/i2c/%.check)
150
151.KEEP_STATE:
152
153.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
154
155install_h: $(ROOTDIRS) $(USR_PSM_ISYS_I2C_DIRS) .WAIT \
156		$(ROOTHDRS) $(ROOTI2CHDRS) \
157		$(ROOTMONHDRS) \
158		$(SUN4_ROOTHDRS) $(ROOTLINK)
159
160check:	$(CHECKHDRS)
161
162#
163# install rules
164#
165$(USR_PSM_MON_DIR):	$(USR_PSM_ISYS_DIR)
166	$(INS.dir)
167
168$(USR_PSM_ISYS_I2C_DIRS):
169	$(INS.dir)
170
171$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4u/sys/% $(USR_PSM_ISYS_DIR)
172	$(INS.file)
173
174$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
175	$(INS.file)
176
177$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
178	$(INS.file)
179
180$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
181	$(INS.file)
182
183$(USR_PSM_MON_DIR)/%:	mon/% $(USR_PSM_MON_DIR)
184	$(INS.file)
185
186$(ROOTDIRS):
187	$(INS.dir)
188
189# -r because this used to be a directory and is now a link.
190$(ROOTLINK):	$(ROOTDIRS)
191	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@
192
193mon/%.check:	mon/%.h
194	$(DOT_H_CHECK)
195
196%.check:	../../sfmmu/sys/%.h
197	$(DOT_H_CHECK)
198%.cmncheck:	../../sun4/sys/%.h
199	$(DOT_H_CHECK)
200
201FRC:
202
203include ../../Makefile.targ
204