xref: /titanic_51/usr/src/uts/sun4u/sys/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
24*7c478bd9Sstevel@tonic-gate#
25*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate# uts/sun4u/sys/Makefile
29*7c478bd9Sstevel@tonic-gate#
30*7c478bd9Sstevel@tonic-gateUTSBASE	= ../..
31*7c478bd9Sstevel@tonic-gate
32*7c478bd9Sstevel@tonic-gate#
33*7c478bd9Sstevel@tonic-gate# include global definitions
34*7c478bd9Sstevel@tonic-gate#
35*7c478bd9Sstevel@tonic-gateinclude ../Makefile.sun4u
36*7c478bd9Sstevel@tonic-gate
37*7c478bd9Sstevel@tonic-gate#
38*7c478bd9Sstevel@tonic-gate# Override defaults.
39*7c478bd9Sstevel@tonic-gate#
40*7c478bd9Sstevel@tonic-gateFILEMODE	 = 644
41*7c478bd9Sstevel@tonic-gateGROUP = bin
42*7c478bd9Sstevel@tonic-gate
43*7c478bd9Sstevel@tonic-gateSUN4_HDRS=			\
44*7c478bd9Sstevel@tonic-gate	async.h			\
45*7c478bd9Sstevel@tonic-gate	clock.h			\
46*7c478bd9Sstevel@tonic-gate	cmp.h			\
47*7c478bd9Sstevel@tonic-gate	cpc_ultra.h		\
48*7c478bd9Sstevel@tonic-gate	cpu_sgnblk_defs.h 	\
49*7c478bd9Sstevel@tonic-gate	ddi_subrdefs.h		\
50*7c478bd9Sstevel@tonic-gate	dvma.h			\
51*7c478bd9Sstevel@tonic-gate	eeprom.h		\
52*7c478bd9Sstevel@tonic-gate	fcode.h			\
53*7c478bd9Sstevel@tonic-gate	idprom.h		\
54*7c478bd9Sstevel@tonic-gate	intr.h			\
55*7c478bd9Sstevel@tonic-gate	intreg.h		\
56*7c478bd9Sstevel@tonic-gate	ivintr.h		\
57*7c478bd9Sstevel@tonic-gate	memlist_plat.h  	\
58*7c478bd9Sstevel@tonic-gate	memnode.h		\
59*7c478bd9Sstevel@tonic-gate	nexusdebug.h		\
60*7c478bd9Sstevel@tonic-gate	nexusintr_impl.h	\
61*7c478bd9Sstevel@tonic-gate	prom_debug.h		\
62*7c478bd9Sstevel@tonic-gate	scb.h			\
63*7c478bd9Sstevel@tonic-gate	sun4asi.h		\
64*7c478bd9Sstevel@tonic-gate	tod.h			\
65*7c478bd9Sstevel@tonic-gate	trapstat.h		\
66*7c478bd9Sstevel@tonic-gate	vis.h			\
67*7c478bd9Sstevel@tonic-gate	vm_machparam.h		\
68*7c478bd9Sstevel@tonic-gate	x_call.h		\
69*7c478bd9Sstevel@tonic-gate	xc_impl.h		\
70*7c478bd9Sstevel@tonic-gate	zsmach.h
71*7c478bd9Sstevel@tonic-gate
72*7c478bd9Sstevel@tonic-gateHDRS=	\
73*7c478bd9Sstevel@tonic-gate	cheetahregs.h		\
74*7c478bd9Sstevel@tonic-gate	cpr_impl.h		\
75*7c478bd9Sstevel@tonic-gate	ecc_kstat.h		\
76*7c478bd9Sstevel@tonic-gate	envctrl.h		\
77*7c478bd9Sstevel@tonic-gate	envctrl_gen.h		\
78*7c478bd9Sstevel@tonic-gate	envctrl_ue250.h		\
79*7c478bd9Sstevel@tonic-gate	envctrl_ue450.h		\
80*7c478bd9Sstevel@tonic-gate	errclassify.h		\
81*7c478bd9Sstevel@tonic-gate	gpio_87317.h		\
82*7c478bd9Sstevel@tonic-gate	fc_plat.h		\
83*7c478bd9Sstevel@tonic-gate	iocache.h		\
84*7c478bd9Sstevel@tonic-gate	iommu.h			\
85*7c478bd9Sstevel@tonic-gate	machasi.h		\
86*7c478bd9Sstevel@tonic-gate	machclock.h		\
87*7c478bd9Sstevel@tonic-gate	machcpuvar.h		\
88*7c478bd9Sstevel@tonic-gate	machparam.h		\
89*7c478bd9Sstevel@tonic-gate	machsystm.h		\
90*7c478bd9Sstevel@tonic-gate	machthread.h		\
91*7c478bd9Sstevel@tonic-gate	memtestio.h		\
92*7c478bd9Sstevel@tonic-gate	memtestio_ch.h		\
93*7c478bd9Sstevel@tonic-gate	memtestio_chp.h		\
94*7c478bd9Sstevel@tonic-gate	memtestio_ja.h		\
95*7c478bd9Sstevel@tonic-gate	memtestio_jg.h		\
96*7c478bd9Sstevel@tonic-gate	memtestio_sf.h		\
97*7c478bd9Sstevel@tonic-gate	memtestio_sr.h		\
98*7c478bd9Sstevel@tonic-gate	mmu.h			\
99*7c478bd9Sstevel@tonic-gate	prom_plat.h		\
100*7c478bd9Sstevel@tonic-gate	pte.h			\
101*7c478bd9Sstevel@tonic-gate	sbd_ioctl.h		\
102*7c478bd9Sstevel@tonic-gate	spitregs.h		\
103*7c478bd9Sstevel@tonic-gate	starfire.h		\
104*7c478bd9Sstevel@tonic-gate	sysioerr.h		\
105*7c478bd9Sstevel@tonic-gate	sysiosbus.h		\
106*7c478bd9Sstevel@tonic-gate	todmostek.h		\
107*7c478bd9Sstevel@tonic-gate	traptrace.h		\
108*7c478bd9Sstevel@tonic-gate	us_drv.h		\
109*7c478bd9Sstevel@tonic-gate	wci_cmmu.h		\
110*7c478bd9Sstevel@tonic-gate	wci_common.h		\
111*7c478bd9Sstevel@tonic-gate	wci_offsets.h		\
112*7c478bd9Sstevel@tonic-gate	wci_regs.h		\
113*7c478bd9Sstevel@tonic-gate	wrsm.h			\
114*7c478bd9Sstevel@tonic-gate	wrsm_config.h		\
115*7c478bd9Sstevel@tonic-gate	wrsm_plugin.h		\
116*7c478bd9Sstevel@tonic-gate	wrsm_plat.h		\
117*7c478bd9Sstevel@tonic-gate	wrsm_common.h		\
118*7c478bd9Sstevel@tonic-gate	wrsm_types.h
119*7c478bd9Sstevel@tonic-gate
120*7c478bd9Sstevel@tonic-gateDMFEHDRS =	dmfe.h dmfe_impl.h miiregs.h
121*7c478bd9Sstevel@tonic-gate
122*7c478bd9Sstevel@tonic-gateROOTDMFEDIR = $(ROOT)/usr/include/sys
123*7c478bd9Sstevel@tonic-gate
124*7c478bd9Sstevel@tonic-gateROOTDMFEHDRS = $(DMFEHDRS:%=$(ROOTDMFEDIR)/%)
125*7c478bd9Sstevel@tonic-gate
126*7c478bd9Sstevel@tonic-gateI2CHDRS =	clients/max1617.h misc/i2c_svc.h clients/i2c_client.h	\
127*7c478bd9Sstevel@tonic-gate		clients/scmi2c.h clients/hpc3130.h clients/lm75.h	\
128*7c478bd9Sstevel@tonic-gate		clients/pcf8591.h clients/ssc050.h
129*7c478bd9Sstevel@tonic-gateI2C_DIRS=	clients misc
130*7c478bd9Sstevel@tonic-gateUSR_PSM_ISYS_I2C_ROOT=	$(USR_PSM_ISYS_DIR)/i2c
131*7c478bd9Sstevel@tonic-gateUSR_PSM_ISYS_I2C_DIRS=	$(USR_PSM_ISYS_I2C_ROOT) \
132*7c478bd9Sstevel@tonic-gate			$(I2C_DIRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
133*7c478bd9Sstevel@tonic-gate
134*7c478bd9Sstevel@tonic-gateROOTI2CHDRS=		$(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
135*7c478bd9Sstevel@tonic-gate
136*7c478bd9Sstevel@tonic-gate
137*7c478bd9Sstevel@tonic-gateMONHDRS=
138*7c478bd9Sstevel@tonic-gate#MONHDRS=	eeprom.h    idprom.h    keyboard.h  password.h
139*7c478bd9Sstevel@tonic-gate
140*7c478bd9Sstevel@tonic-gateUSR_PSM_MON_DIR=	$(USR_PSM_ISYS_DIR)/mon
141*7c478bd9Sstevel@tonic-gate
142*7c478bd9Sstevel@tonic-gateROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
143*7c478bd9Sstevel@tonic-gateSUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
144*7c478bd9Sstevel@tonic-gate
145*7c478bd9Sstevel@tonic-gateROOTMONHDRS=		$(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
146*7c478bd9Sstevel@tonic-gate
147*7c478bd9Sstevel@tonic-gateROOTDIR=		$(ROOT)/usr/share/src
148*7c478bd9Sstevel@tonic-gateROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
149*7c478bd9Sstevel@tonic-gate
150*7c478bd9Sstevel@tonic-gateROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
151*7c478bd9Sstevel@tonic-gateLINKDEST=		../../../../platform/$(PLATFORM)/include/sys
152*7c478bd9Sstevel@tonic-gate
153*7c478bd9Sstevel@tonic-gateCHECKHDRS=		$(HDRS:%.h=%.check) \
154*7c478bd9Sstevel@tonic-gate			$(MONHDRS:%.h=mon/%.check) \
155*7c478bd9Sstevel@tonic-gate			$(SUN4_HDRS:%.h=%.cmncheck)
156*7c478bd9Sstevel@tonic-gate
157*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
158*7c478bd9Sstevel@tonic-gate
159*7c478bd9Sstevel@tonic-gate.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
160*7c478bd9Sstevel@tonic-gate
161*7c478bd9Sstevel@tonic-gateinstall_h: $(ROOTDIRS) $(USR_PSM_ISYS_I2C_DIRS) $(ROOTDMFEDIR) .WAIT \
162*7c478bd9Sstevel@tonic-gate		$(ROOTHDRS) $(ROOTI2CHDRS) \
163*7c478bd9Sstevel@tonic-gate		$(ROOTMONHDRS) $(ROOTDMFEHDRS) \
164*7c478bd9Sstevel@tonic-gate		$(SUN4_ROOTHDRS) $(ROOTLINK)
165*7c478bd9Sstevel@tonic-gate
166*7c478bd9Sstevel@tonic-gatecheck:	$(CHECKHDRS)
167*7c478bd9Sstevel@tonic-gate
168*7c478bd9Sstevel@tonic-gate#
169*7c478bd9Sstevel@tonic-gate# install rules
170*7c478bd9Sstevel@tonic-gate#
171*7c478bd9Sstevel@tonic-gate$(USR_PSM_MON_DIR):	$(USR_PSM_ISYS_DIR)
172*7c478bd9Sstevel@tonic-gate	$(INS.dir.root.bin)
173*7c478bd9Sstevel@tonic-gate
174*7c478bd9Sstevel@tonic-gate$(USR_PSM_ISYS_I2C_DIRS):
175*7c478bd9Sstevel@tonic-gate	$(INS.dir.root.bin)
176*7c478bd9Sstevel@tonic-gate
177*7c478bd9Sstevel@tonic-gate$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
178*7c478bd9Sstevel@tonic-gate	$(INS.file)
179*7c478bd9Sstevel@tonic-gate
180*7c478bd9Sstevel@tonic-gate$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
181*7c478bd9Sstevel@tonic-gate	$(INS.file)
182*7c478bd9Sstevel@tonic-gate
183*7c478bd9Sstevel@tonic-gate$(USR_PSM_MON_DIR)/%:	mon/% $(USR_PSM_MON_DIR)
184*7c478bd9Sstevel@tonic-gate	$(INS.file)
185*7c478bd9Sstevel@tonic-gate
186*7c478bd9Sstevel@tonic-gate$(ROOTDMFEDIR)/%: % $(ROOTDMFEDIR)
187*7c478bd9Sstevel@tonic-gate	$(INS.file)
188*7c478bd9Sstevel@tonic-gate
189*7c478bd9Sstevel@tonic-gate$(ROOTDMFEDIR):
190*7c478bd9Sstevel@tonic-gate	$(INS.dir.root.bin)
191*7c478bd9Sstevel@tonic-gate
192*7c478bd9Sstevel@tonic-gate$(ROOTDIRS):
193*7c478bd9Sstevel@tonic-gate	$(INS.dir.root.bin)
194*7c478bd9Sstevel@tonic-gate
195*7c478bd9Sstevel@tonic-gate# -r because this used to be a directory and is now a link.
196*7c478bd9Sstevel@tonic-gate$(ROOTLINK):	$(ROOTDIRS)
197*7c478bd9Sstevel@tonic-gate	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@ $(CHOWNLINK) $(CHGRPLINK)
198*7c478bd9Sstevel@tonic-gate
199*7c478bd9Sstevel@tonic-gatemon/%.check:	mon/%.h
200*7c478bd9Sstevel@tonic-gate	$(DOT_H_CHECK)
201*7c478bd9Sstevel@tonic-gate
202*7c478bd9Sstevel@tonic-gate%.check:	../../sfmmu/sys/%.h
203*7c478bd9Sstevel@tonic-gate	$(DOT_H_CHECK)
204*7c478bd9Sstevel@tonic-gate%.cmncheck:	../../sun4/sys/%.h
205*7c478bd9Sstevel@tonic-gate	$(DOT_H_CHECK)
206*7c478bd9Sstevel@tonic-gate
207*7c478bd9Sstevel@tonic-gateFRC:
208*7c478bd9Sstevel@tonic-gate
209*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
210