xref: /titanic_44/usr/src/uts/sun4v/sys/Makefile (revision e23de8e200dff2773d80ce69c9f2e745b544b9b1)
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
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#
26# uts/sun4v/sys/Makefile
27#
28# include global definitions
29UTSBASE	= ../..
30
31#
32# include global definitions
33#
34include ../Makefile.sun4v
35
36#
37# Override defaults.
38#
39FILEMODE	 = 644
40
41SUN4_HDRS=			\
42	clock.h			\
43	cmp.h			\
44	cpc_ultra.h		\
45	cpu_sgnblk_defs.h 	\
46	ddi_subrdefs.h		\
47	dvma.h			\
48	eeprom.h		\
49	fcode.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
68CLOSED_SUN4_HDRS=			\
69	memtestio.h
70
71HDRS=	\
72	ds_pri.h		\
73	ds_snmp.h		\
74	hypervisor_api.h	\
75	hsvc.h			\
76	machasi.h		\
77	machclock.h		\
78	machcpuvar.h		\
79	mach_descrip.h		\
80	machintreg.h		\
81	machparam.h		\
82	machsystm.h		\
83	machthread.h		\
84	mmu.h			\
85	niagaraasi.h		\
86	niagararegs.h		\
87	ntwdt.h			\
88	pte.h			\
89	prom_plat.h		\
90	qcn.h			\
91	soft_state.h		\
92	traptrace.h		\
93	vlds.h
94
95CLOSED_HDRS=	\
96	memtestio_ni.h		\
97	memtestio_n2.h		\
98	memtestio_v.h		\
99	memtestio_vf.h
100
101ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
102$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
103
104SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
105$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
106
107ROOTDIR=		$(ROOT)/usr/share/src
108ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
109
110ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
111LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
112
113CHECKHDRS=		$(HDRS:%.h=%.check) \
114			$(SUN4_HDRS:%.h=%.cmncheck)
115
116$(CLOSED_BUILD)CHECKHDRS +=			\
117	$(CLOSED_HDRS:%.h=%.check)		\
118	$(CLOSED_SUN4_HDRS:%.h=%.cmncheck)
119
120.KEEP_STATE:
121
122.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(SUN4_ROOTHDRS)
123
124install_h: $(ROOTDIRS) .WAIT \
125		$(ROOTHDRS) .WAIT \
126		$(SUN4_ROOTHDRS) .WAIT $(ROOTLINK)
127
128check:	$(CHECKHDRS)
129
130#
131# install rules
132#
133$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
134	$(INS.file)
135
136$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
137	$(INS.file)
138
139$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
140	$(INS.file)
141
142$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4v/sys/% $(USR_PSM_ISYS_DIR)
143	$(INS.file)
144
145$(ROOTDIRS):
146	$(INS.dir)
147
148# -r because this used to be a directory and is now a link.
149$(ROOTLINK):	$(ROOTDIRS)
150	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@
151
152mon/%.check:	mon/%.h
153	$(DOT_H_CHECK)
154
155%.check:	../../sfmmu/sys/%.h
156	$(DOT_H_CHECK)
157%.check:	$(CLOSED)/uts/sun4v/sys/%.h
158	$(DOT_H_CHECK)
159%.cmncheck:	../../sun4/sys/%.h
160	$(DOT_H_CHECK)
161%.cmncheck:	$(CLOSED)/uts/sun4/sys/%.h
162	$(DOT_H_CHECK)
163
164FRC:
165
166include ../../Makefile.targ
167