xref: /titanic_44/usr/src/uts/sun4u/sys/Makefile (revision c138f478d2bc94e73ab8f6a084e323bec25e62f5)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28# uts/sun4u/sys/Makefile
29#
30UTSBASE	= ../..
31
32#
33# include global definitions
34#
35include ../Makefile.sun4u
36
37#
38# Override defaults.
39#
40FILEMODE	 = 644
41GROUP = bin
42
43SUN4_HDRS=			\
44	async.h			\
45	clock.h			\
46	cmp.h			\
47	cpc_ultra.h		\
48	cpu_sgnblk_defs.h 	\
49	ddi_subrdefs.h		\
50	dvma.h			\
51	eeprom.h		\
52	errclassify.h		\
53	fcode.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	ecc_kstat.h		\
79	gpio_87317.h		\
80	fc_plat.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	mmu.h			\
90	prom_plat.h		\
91	pte.h			\
92	sbd_ioctl.h		\
93	spitregs.h		\
94	starfire.h		\
95	sysioerr.h		\
96	sysiosbus.h		\
97	todmostek.h		\
98	traptrace.h		\
99	us_drv.h		\
100	wci_cmmu.h		\
101	wci_common.h		\
102	wci_offsets.h		\
103	wci_regs.h		\
104	wrsm.h			\
105	wrsm_config.h		\
106	wrsm_plugin.h		\
107	wrsm_plat.h		\
108	wrsm_common.h		\
109	wrsm_types.h
110
111$(CLOSED_BUILD)CLOSED_HDRS=	\
112	envctrl.h		\
113	envctrl_gen.h		\
114	envctrl_ue250.h		\
115	envctrl_ue450.h		\
116	memtestio_ch.h		\
117	memtestio_chp.h		\
118	memtestio_ja.h		\
119	memtestio_jg.h		\
120	memtestio_pn.h		\
121	memtestio_sf.h		\
122	memtestio_sr.h		\
123	memtestio_u.h
124
125DMFEHDRS =	dmfe.h dmfe_impl.h miiregs.h
126
127ROOTDMFEDIR = $(ROOT)/usr/include/sys
128
129ROOTDMFEHDRS = $(DMFEHDRS:%=$(ROOTDMFEDIR)/%)
130
131$(CLOSED_BUILD)CLOSED_I2CHDRS =	clients/scmi2c.h
132
133I2CHDRS =	clients/max1617.h misc/i2c_svc.h clients/i2c_client.h	\
134		clients/hpc3130.h clients/lm75.h	\
135		clients/pcf8591.h clients/ssc050.h $(CLOSED_I2CHDRS)
136
137I2C_DIRS=	clients misc
138USR_PSM_ISYS_I2C_ROOT=	$(USR_PSM_ISYS_DIR)/i2c
139USR_PSM_ISYS_I2C_DIRS=	$(USR_PSM_ISYS_I2C_ROOT) \
140			$(I2C_DIRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
141
142ROOTI2CHDRS=		$(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
143
144MONHDRS=
145#MONHDRS=	eeprom.h    idprom.h    keyboard.h  password.h
146
147USR_PSM_MON_DIR=	$(USR_PSM_ISYS_DIR)/mon
148
149ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
150$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
151
152SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
153$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
154
155ROOTMONHDRS=		$(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
156
157ROOTDIR=		$(ROOT)/usr/share/src
158ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
159
160ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
161LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
162
163CHECKHDRS=		$(HDRS:%.h=%.check) \
164			$(MONHDRS:%.h=mon/%.check) \
165			$(SUN4_HDRS:%.h=%.cmncheck)
166
167$(CLOSED_BUILD)CHECKHDRS += $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun4u/sys/%.check)
168$(CLOSED_BUILD)CHECKHDRS += \
169		$(CLOSED_I2CHDRS:%.h=$(CLOSED)/uts/sun4u/sys/i2c/%.check)
170
171.KEEP_STATE:
172
173.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
174
175install_h: $(ROOTDIRS) $(USR_PSM_ISYS_I2C_DIRS) $(ROOTDMFEDIR) .WAIT \
176		$(ROOTHDRS) $(ROOTI2CHDRS) \
177		$(ROOTMONHDRS) $(ROOTDMFEHDRS) \
178		$(SUN4_ROOTHDRS) $(ROOTLINK)
179
180check:	$(CHECKHDRS)
181
182#
183# install rules
184#
185$(USR_PSM_MON_DIR):	$(USR_PSM_ISYS_DIR)
186	$(INS.dir.root.bin)
187
188$(USR_PSM_ISYS_I2C_DIRS):
189	$(INS.dir.root.bin)
190
191$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4u/sys/% $(USR_PSM_ISYS_DIR)
192	$(INS.file)
193
194$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
195	$(INS.file)
196
197$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
198	$(INS.file)
199
200$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
201	$(INS.file)
202
203$(USR_PSM_MON_DIR)/%:	mon/% $(USR_PSM_MON_DIR)
204	$(INS.file)
205
206$(ROOTDMFEDIR)/%: % $(ROOTDMFEDIR)
207	$(INS.file)
208
209$(ROOTDMFEDIR):
210	$(INS.dir.root.bin)
211
212$(ROOTDIRS):
213	$(INS.dir.root.bin)
214
215# -r because this used to be a directory and is now a link.
216$(ROOTLINK):	$(ROOTDIRS)
217	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@ $(CHOWNLINK) $(CHGRPLINK)
218
219mon/%.check:	mon/%.h
220	$(DOT_H_CHECK)
221
222%.check:	../../sfmmu/sys/%.h
223	$(DOT_H_CHECK)
224%.cmncheck:	../../sun4/sys/%.h
225	$(DOT_H_CHECK)
226
227FRC:
228
229include ../../Makefile.targ
230