xref: /titanic_52/usr/src/uts/sun4v/sys/Makefile (revision 74ceea2d43ae370f7678d3f98ea3e47fde931098)
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 2008 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
40GROUP = bin
41
42SUN4_HDRS=			\
43	clock.h			\
44	cmp.h			\
45	cpc_ultra.h		\
46	cpu_sgnblk_defs.h 	\
47	ddi_subrdefs.h		\
48	dvma.h			\
49	eeprom.h		\
50	fcode.h			\
51	idprom.h		\
52	intr.h			\
53	intreg.h		\
54	ivintr.h		\
55	memlist_plat.h	 	\
56	memnode.h		\
57	nexusdebug.h		\
58	prom_debug.h		\
59	scb.h			\
60	sun4asi.h		\
61	tod.h			\
62	trapstat.h		\
63	vis.h			\
64	vm_machparam.h		\
65	x_call.h		\
66	xc_impl.h		\
67	zsmach.h
68
69CLOSED_SUN4_HDRS=			\
70	memtestio.h
71
72HDRS=	\
73	ds_pri.h		\
74	ds_snmp.h		\
75	hypervisor_api.h	\
76	hsvc.h			\
77	machasi.h		\
78	machclock.h		\
79	machcpuvar.h		\
80	mach_descrip.h		\
81	machintreg.h		\
82	machparam.h		\
83	machsystm.h		\
84	machthread.h		\
85	mmu.h			\
86	niagaraasi.h		\
87	niagararegs.h		\
88	ntwdt.h			\
89	pte.h			\
90	prom_plat.h		\
91	qcn.h			\
92	soft_state.h		\
93	traptrace.h		\
94	vlds.h
95
96CLOSED_HDRS=	\
97	memtestio_ni.h		\
98	memtestio_n2.h		\
99	memtestio_v.h		\
100	memtestio_vf.h
101
102ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
103$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
104
105SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
106$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
107
108ROOTDIR=		$(ROOT)/usr/share/src
109ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
110
111ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
112LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
113
114CHECKHDRS=		$(HDRS:%.h=%.check) \
115			$(SUN4_HDRS:%.h=%.cmncheck)
116
117$(CLOSED_BUILD)CHECKHDRS +=			\
118	$(CLOSED_HDRS:%.h=%.check)		\
119	$(CLOSED_SUN4_HDRS:%.h=%.cmncheck)
120
121.KEEP_STATE:
122
123.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(SUN4_ROOTHDRS)
124
125install_h: $(ROOTDIRS) .WAIT \
126		$(ROOTHDRS) .WAIT \
127		$(SUN4_ROOTHDRS) .WAIT $(ROOTLINK)
128
129check:	$(CHECKHDRS)
130
131#
132# install rules
133#
134$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
135	$(INS.file)
136
137$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
138	$(INS.file)
139
140$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
141	$(INS.file)
142
143$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4v/sys/% $(USR_PSM_ISYS_DIR)
144	$(INS.file)
145
146$(ROOTDIRS):
147	$(INS.dir.root.bin)
148
149# -r because this used to be a directory and is now a link.
150$(ROOTLINK):	$(ROOTDIRS)
151	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@ $(CHOWNLINK) $(CHGRPLINK)
152
153mon/%.check:	mon/%.h
154	$(DOT_H_CHECK)
155
156%.check:	../../sfmmu/sys/%.h
157	$(DOT_H_CHECK)
158%.check:	$(CLOSED)/uts/sun4v/sys/%.h
159	$(DOT_H_CHECK)
160%.cmncheck:	../../sun4/sys/%.h
161	$(DOT_H_CHECK)
162%.cmncheck:	$(CLOSED)/uts/sun4/sys/%.h
163	$(DOT_H_CHECK)
164
165FRC:
166
167include ../../Makefile.targ
168