xref: /illumos-gate/usr/src/uts/sun4v/sys/Makefile (revision c3377ee9)
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# Copyright 2019 Joyent, Inc.
26#
27# include global definitions
28UTSBASE	= ../..
29
30#
31# include global definitions
32#
33include ../Makefile.sun4v
34
35#
36# Override defaults.
37#
38FILEMODE	 = 644
39
40SUN4_HDRS=			\
41	clock.h			\
42	cmp.h			\
43	cpc_ultra.h		\
44	cpu_sgnblk_defs.h	\
45	ddi_subrdefs.h		\
46	dvma.h			\
47	eeprom.h		\
48	fcode.h			\
49	idprom.h		\
50	intr.h			\
51	intreg.h		\
52	ivintr.h		\
53	memlist_plat.h		\
54	memnode.h		\
55	nexusdebug.h		\
56	prom_debug.h		\
57	scb.h			\
58	smt.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
68HDRS=	\
69	ds_pri.h		\
70	ds_snmp.h		\
71	hypervisor_api.h	\
72	hsvc.h			\
73	machasi.h		\
74	machclock.h		\
75	machcpuvar.h		\
76	mach_descrip.h		\
77	machintreg.h		\
78	machparam.h		\
79	machsystm.h		\
80	machthread.h		\
81	mmu.h			\
82	niagaraasi.h		\
83	niagararegs.h		\
84	ntwdt.h			\
85	pte.h			\
86	prom_plat.h		\
87	qcn.h			\
88	soft_state.h		\
89	traptrace.h		\
90	vlds.h
91
92ROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
93
94SUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
95
96ROOTDIR=		$(ROOT)/usr/share/src
97ROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
98
99ROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
100LINKDEST=		../../../../platform/$(PLATFORM)/include/sys
101
102CHECKHDRS=		$(HDRS:%.h=%.check) \
103			$(SUN4_HDRS:%.h=%.cmncheck)
104
105.KEEP_STATE:
106
107.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(SUN4_ROOTHDRS)
108
109install_h: $(ROOTDIRS) .WAIT \
110		$(ROOTHDRS) .WAIT \
111		$(SUN4_ROOTHDRS) .WAIT $(ROOTLINK)
112
113check:	$(CHECKHDRS)
114
115#
116# install rules
117#
118$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
119	$(INS.file)
120
121$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
122	$(INS.file)
123
124$(ROOTDIRS):
125	$(INS.dir)
126
127# -r because this used to be a directory and is now a link.
128$(ROOTLINK):	$(ROOTDIRS)
129	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@
130
131mon/%.check:	mon/%.h
132	$(DOT_H_CHECK)
133
134%.check:	../../sfmmu/sys/%.h
135	$(DOT_H_CHECK)
136%.cmncheck:	../../sun4/sys/%.h
137	$(DOT_H_CHECK)
138
139FRC:
140
141include ../../Makefile.targ
142