xref: /titanic_50/usr/src/uts/sun4v/sys/Makefile (revision 9512fe850e98fdd448c638ca63fdd92a8a510255)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#ident	"%Z%%M%	%I%	%E% SMI"
26#
27# uts/sun4v/sys/Makefile
28#
29# include global definitions
30UTSBASE	= ../..
31
32#
33# include global definitions
34#
35include ../Makefile.sun4v
36
37#
38# Override defaults.
39#
40FILEMODE	 = 644
41GROUP = bin
42
43SUN4_HDRS=			\
44	clock.h			\
45	cmp.h			\
46	cpc_ultra.h		\
47	cpu_sgnblk_defs.h 	\
48	ddi_subrdefs.h		\
49	dvma.h			\
50	eeprom.h		\
51	fcode.h			\
52	idprom.h		\
53	intr.h			\
54	intreg.h		\
55	ivintr.h		\
56	memlist_plat.h	 	\
57	memnode.h		\
58	nexusdebug.h		\
59	prom_debug.h		\
60	scb.h			\
61	sun4asi.h		\
62	tod.h			\
63	trapstat.h		\
64	vis.h			\
65	vm_machparam.h		\
66	x_call.h		\
67	xc_impl.h		\
68	zsmach.h
69
70CLOSED_SUN4_HDRS=			\
71	memtestio.h
72
73HDRS=	\
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	pte.h			\
88	prom_plat.h		\
89	qcn.h			\
90	traptrace.h
91
92CLOSED_HDRS=	\
93	memtestio_ni.h		\
94	memtestio_v.h
95
96ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
97$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
98
99SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
100$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
101
102ROOTDIR=		$(ROOT)/usr/share/src
103ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
104
105ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
106LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
107
108CHECKHDRS=		$(HDRS:%.h=%.check) \
109			$(SUN4_HDRS:%.h=%.cmncheck)
110$(CLOSED_BUILD)CHECKHDRS +=			\
111	$(CLOSED_HDRS:%.h=%.check)		\
112	$(CLOSED_SUN4_HDRS:%.h=%.cmncheck)
113
114.KEEP_STATE:
115
116.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(SUN4_ROOTHDRS)
117
118install_h: $(ROOTDIRS) .WAIT \
119		$(ROOTHDRS) .WAIT \
120		$(SUN4_ROOTHDRS) .WAIT $(ROOTLINK)
121
122check:	$(CHECKHDRS)
123
124#
125# install rules
126#
127$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
128	$(INS.file)
129
130$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
131	$(INS.file)
132
133$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
134	$(INS.file)
135
136$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4v/sys/% $(USR_PSM_ISYS_DIR)
137	$(INS.file)
138
139$(ROOTDIRS):
140	$(INS.dir.root.bin)
141
142# -r because this used to be a directory and is now a link.
143$(ROOTLINK):	$(ROOTDIRS)
144	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@ $(CHOWNLINK) $(CHGRPLINK)
145
146mon/%.check:	mon/%.h
147	$(DOT_H_CHECK)
148
149%.check:	../../sfmmu/sys/%.h
150	$(DOT_H_CHECK)
151%.check:	$(CLOSED)/uts/sun4v/sys/%.h
152	$(DOT_H_CHECK)
153%.cmncheck:	../../sun4/sys/%.h
154	$(DOT_H_CHECK)
155%.cmncheck:	$(CLOSED)/uts/sun4/sys/%.h
156	$(DOT_H_CHECK)
157
158FRC:
159
160include ../../Makefile.targ
161