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