xref: /titanic_44/usr/src/uts/sun4v/sys/Makefile (revision 62a1b812a0c45c0d4c10ef645dda42bf71080108)
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 2007 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	ds_pri.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
95CLOSED_HDRS=	\
96	memtestio_ni.h		\
97	memtestio_n2.h		\
98	memtestio_v.h
99
100NXGEHDRS=			\
101	nxge.h			\
102	nxge_common.h		\
103	nxge_common_impl.h	\
104	nxge_defs.h		\
105	nxge_hw.h		\
106	nxge_impl.h		\
107	nxge_ipp.h		\
108	nxge_ipp_hw.h		\
109	nxge_mac.h		\
110	nxge_mac_hw.h		\
111	nxge_fflp.h		\
112	nxge_fflp_hw.h		\
113	nxge_mii.h		\
114	nxge_rxdma.h		\
115	nxge_rxdma_hw.h		\
116	nxge_txc.h		\
117	nxge_txc_hw.h		\
118	nxge_txdma.h		\
119	nxge_txdma_hw.h		\
120	nxge_virtual.h		\
121	nxge_espc.h
122
123ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
124$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
125
126SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
127$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
128
129ROOTDIR=		$(ROOT)/usr/share/src
130ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
131
132ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
133LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
134
135CHECKHDRS=		$(HDRS:%.h=%.check) \
136			$(SUN4_HDRS:%.h=%.cmncheck)	\
137			$(NXGEHDRS:%.h=nxge/%.check)
138
139$(CLOSED_BUILD)CHECKHDRS +=			\
140	$(CLOSED_HDRS:%.h=%.check)		\
141	$(CLOSED_SUN4_HDRS:%.h=%.cmncheck)
142
143.KEEP_STATE:
144
145.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(SUN4_ROOTHDRS)
146
147install_h: $(ROOTDIRS) .WAIT \
148		$(ROOTHDRS) .WAIT \
149		$(SUN4_ROOTHDRS) .WAIT $(ROOTLINK)
150
151check:	$(CHECKHDRS)
152
153#
154# install rules
155#
156$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
157	$(INS.file)
158
159$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
160	$(INS.file)
161
162$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
163	$(INS.file)
164
165$(USR_PSM_ISYS_DIR)/%:	$(CLOSED)/uts/sun4v/sys/% $(USR_PSM_ISYS_DIR)
166	$(INS.file)
167
168$(ROOTDIRS):
169	$(INS.dir.root.bin)
170
171# -r because this used to be a directory and is now a link.
172$(ROOTLINK):	$(ROOTDIRS)
173	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@ $(CHOWNLINK) $(CHGRPLINK)
174
175mon/%.check:	mon/%.h
176	$(DOT_H_CHECK)
177
178%.check:	../../sfmmu/sys/%.h
179	$(DOT_H_CHECK)
180%.check:	$(CLOSED)/uts/sun4v/sys/%.h
181	$(DOT_H_CHECK)
182%.cmncheck:	../../sun4/sys/%.h
183	$(DOT_H_CHECK)
184%.cmncheck:	$(CLOSED)/uts/sun4/sys/%.h
185	$(DOT_H_CHECK)
186
187FRC:
188
189include ../../Makefile.targ
190