xref: /titanic_51/usr/src/uts/sun4u/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate#	This makefile drives the production of all implementation architecture
29*7c478bd9Sstevel@tonic-gate#	dependent modules for the sun4u architecture.
30*7c478bd9Sstevel@tonic-gate#
31*7c478bd9Sstevel@tonic-gate
32*7c478bd9Sstevel@tonic-gateUTSBASE = ..
33*7c478bd9Sstevel@tonic-gate
34*7c478bd9Sstevel@tonic-gateinclude Makefile.sun4u
35*7c478bd9Sstevel@tonic-gate
36*7c478bd9Sstevel@tonic-gate#
37*7c478bd9Sstevel@tonic-gate#	The following are SPARC specific (rather than sun4u) specific modules
38*7c478bd9Sstevel@tonic-gate#	which are required for the sun4u kernel to completely lint. They are
39*7c478bd9Sstevel@tonic-gate#	not involved in the build in any other way. In order to minimize
40*7c478bd9Sstevel@tonic-gate#	build time, it is assumed that they are up to date. But since sun4u
41*7c478bd9Sstevel@tonic-gate#	is really a separate architecture we cannot use the v7 sparc modules.
42*7c478bd9Sstevel@tonic-gate#
43*7c478bd9Sstevel@tonic-gateSPARC_LIB_DIR	 = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
44*7c478bd9Sstevel@tonic-gate
45*7c478bd9Sstevel@tonic-gateSPARC_LINTS	 =
46*7c478bd9Sstevel@tonic-gate
47*7c478bd9Sstevel@tonic-gate#
48*7c478bd9Sstevel@tonic-gate#
49*7c478bd9Sstevel@tonic-gate#
50*7c478bd9Sstevel@tonic-gateLINT_LIBS	 = $(LINT_LIB) \
51*7c478bd9Sstevel@tonic-gate		   $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
52*7c478bd9Sstevel@tonic-gate		   $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
53*7c478bd9Sstevel@tonic-gate
54*7c478bd9Sstevel@tonic-gate# EXPORT DELETE START
55*7c478bd9Sstevel@tonic-gate#
56*7c478bd9Sstevel@tonic-gate# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
57*7c478bd9Sstevel@tonic-gate# They need to be listed separately since they duplicate global symbols
58*7c478bd9Sstevel@tonic-gate# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
59*7c478bd9Sstevel@tonic-gate# should not be listed in the lint target.
60*7c478bd9Sstevel@tonic-gate#
61*7c478bd9Sstevel@tonic-gateCRYPTO_EK_KMODS	+= aes256
62*7c478bd9Sstevel@tonic-gateCRYPTO_EK_KMODS	+= arcfour2048
63*7c478bd9Sstevel@tonic-gate# EXPORT DELETE END
64*7c478bd9Sstevel@tonic-gate
65*7c478bd9Sstevel@tonic-gate
66*7c478bd9Sstevel@tonic-gatedef		:=	TARGET= def
67*7c478bd9Sstevel@tonic-gateall		:=	TARGET= all
68*7c478bd9Sstevel@tonic-gateinstall		:=	TARGET= install
69*7c478bd9Sstevel@tonic-gateinstall_h	:=	TARGET= install_h
70*7c478bd9Sstevel@tonic-gateclean		:=	TARGET= clean
71*7c478bd9Sstevel@tonic-gateclobber		:=	TARGET= clobber
72*7c478bd9Sstevel@tonic-gatelint		:=	TARGET= lint
73*7c478bd9Sstevel@tonic-gatelintlib		:=	TARGET= lintlib
74*7c478bd9Sstevel@tonic-gatemodlintlib	:=	TARGET= modlintlib
75*7c478bd9Sstevel@tonic-gateclean.lint	:=	TARGET= clean.lint
76*7c478bd9Sstevel@tonic-gatecheck		:=	TARGET= check
77*7c478bd9Sstevel@tonic-gate
78*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
79*7c478bd9Sstevel@tonic-gate
80*7c478bd9Sstevel@tonic-gate.PARALLEL:	$(KMODS) $(XMODS)
81*7c478bd9Sstevel@tonic-gate
82*7c478bd9Sstevel@tonic-gate# Override for CPU_KMODS... they cannot be built
83*7c478bd9Sstevel@tonic-gate# in parallel
84*7c478bd9Sstevel@tonic-gate.NO_PARALLEL:	$(CPU_KMODS)
85*7c478bd9Sstevel@tonic-gate
86*7c478bd9Sstevel@tonic-gatedef all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) \
87*7c478bd9Sstevel@tonic-gate	$(IMPLEMENTATIONS)
88*7c478bd9Sstevel@tonic-gate
89*7c478bd9Sstevel@tonic-gateinstall: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) \
90*7c478bd9Sstevel@tonic-gate	$(IMPLEMENTATIONS)
91*7c478bd9Sstevel@tonic-gate
92*7c478bd9Sstevel@tonic-gatelintlib:	unix
93*7c478bd9Sstevel@tonic-gate
94*7c478bd9Sstevel@tonic-gatemodlintlib:	$(LINT_KMODS)
95*7c478bd9Sstevel@tonic-gate
96*7c478bd9Sstevel@tonic-gategenassym unix $(KMODS) $(IMPLEMENTATIONS):	FRC
97*7c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
98*7c478bd9Sstevel@tonic-gate
99*7c478bd9Sstevel@tonic-gate$(XMODS):	FRC
100*7c478bd9Sstevel@tonic-gate	@if [ -f $@/Makefile  ]; then \
101*7c478bd9Sstevel@tonic-gate		cd $@; pwd; $(MAKE) $(TARGET); \
102*7c478bd9Sstevel@tonic-gate	else \
103*7c478bd9Sstevel@tonic-gate		true; \
104*7c478bd9Sstevel@tonic-gate	fi
105*7c478bd9Sstevel@tonic-gate
106*7c478bd9Sstevel@tonic-gateinstall_h check:	install_platforms $(IMPLEMENTATIONS) FRC
107*7c478bd9Sstevel@tonic-gate	@cd sys; pwd; $(MAKE) $(TARGET)
108*7c478bd9Sstevel@tonic-gate	@cd vm; pwd; $(MAKE) $(TARGET)
109*7c478bd9Sstevel@tonic-gate
110*7c478bd9Sstevel@tonic-gate#
111*7c478bd9Sstevel@tonic-gate# Rules for the /platforms directories.  This is hardwired here because
112*7c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland
113*7c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is
114*7c478bd9Sstevel@tonic-gate# here in kernel land.
115*7c478bd9Sstevel@tonic-gate#
116*7c478bd9Sstevel@tonic-gate$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
117*7c478bd9Sstevel@tonic-gate	-$(INS.dir.root.sys)
118*7c478bd9Sstevel@tonic-gate
119*7c478bd9Sstevel@tonic-gate#
120*7c478bd9Sstevel@tonic-gate# create directories in /usr/platform/ for the implementations that are
121*7c478bd9Sstevel@tonic-gate# defined in $(IMPLEMENTED_PLATFORM)
122*7c478bd9Sstevel@tonic-gate#       (eg. SUNW,Ultra-1)
123*7c478bd9Sstevel@tonic-gate#
124*7c478bd9Sstevel@tonic-gate# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
125*7c478bd9Sstevel@tonic-gate# that are linked to it.
126*7c478bd9Sstevel@tonic-gate#
127*7c478bd9Sstevel@tonic-gate$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM):	$(USR_PLAT_DIR)
128*7c478bd9Sstevel@tonic-gate	-$(INS.dir.root.sys)
129*7c478bd9Sstevel@tonic-gate
130*7c478bd9Sstevel@tonic-gate#
131*7c478bd9Sstevel@tonic-gate# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
132*7c478bd9Sstevel@tonic-gate# to it's corresponding $(IMPLEMENTED_PLATFORM).
133*7c478bd9Sstevel@tonic-gate#
134*7c478bd9Sstevel@tonic-gatePLATFORMS	= $(LINKED_PLATFORMS)
135*7c478bd9Sstevel@tonic-gate
136*7c478bd9Sstevel@tonic-gate$(USR_PLAT_DIRS): $(USR_PLAT_DIR)
137*7c478bd9Sstevel@tonic-gate	$(INS.slink3)
138*7c478bd9Sstevel@tonic-gate
139*7c478bd9Sstevel@tonic-gatePLATFORMS	+= $(IMPLEMENTED_PLATFORM)
140*7c478bd9Sstevel@tonic-gate
141*7c478bd9Sstevel@tonic-gate#
142*7c478bd9Sstevel@tonic-gate# Make the /platforms directories.  This is hardwired here because
143*7c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland
144*7c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is
145*7c478bd9Sstevel@tonic-gate# here in kernel land.
146*7c478bd9Sstevel@tonic-gate#
147*7c478bd9Sstevel@tonic-gateinstall_platforms:	$(ROOT_PSM_DIR) $(USR_PSM_DIR) \
148*7c478bd9Sstevel@tonic-gate			$(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
149*7c478bd9Sstevel@tonic-gate			$(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
150*7c478bd9Sstevel@tonic-gate			$(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR)
151*7c478bd9Sstevel@tonic-gate
152*7c478bd9Sstevel@tonic-gate#
153*7c478bd9Sstevel@tonic-gate# rules for making include, sbin, lib dirs/links in
154*7c478bd9Sstevel@tonic-gate# /usr/platform/$(PLATFORM)/ for desktop platforms
155*7c478bd9Sstevel@tonic-gate#
156*7c478bd9Sstevel@tonic-gate$(USR_DESKTOP_INC_DIR):		$(USR_DESKTOP_DIR)
157*7c478bd9Sstevel@tonic-gate	$(INS.slink4)
158*7c478bd9Sstevel@tonic-gate
159*7c478bd9Sstevel@tonic-gate$(USR_DESKTOP_SBIN_DIR):	$(USR_DESKTOP_DIR)
160*7c478bd9Sstevel@tonic-gate	$(INS.slink5)
161*7c478bd9Sstevel@tonic-gate
162*7c478bd9Sstevel@tonic-gate$(USR_DESKTOP_LIB_DIR):		$(USR_DESKTOP_DIR)
163*7c478bd9Sstevel@tonic-gate	-$(INS.dir.root.bin)
164*7c478bd9Sstevel@tonic-gate
165*7c478bd9Sstevel@tonic-gate#
166*7c478bd9Sstevel@tonic-gate#	Full kernel lint target.
167*7c478bd9Sstevel@tonic-gate#
168*7c478bd9Sstevel@tonic-gateLINT_TARGET	= globallint
169*7c478bd9Sstevel@tonic-gate
170*7c478bd9Sstevel@tonic-gategloballint:
171*7c478bd9Sstevel@tonic-gate	@-$(ECHO) "\nSUN4U KERNEL: global crosschecks:"
172*7c478bd9Sstevel@tonic-gate	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
173*7c478bd9Sstevel@tonic-gate
174*7c478bd9Sstevel@tonic-gatelint:	lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
175*7c478bd9Sstevel@tonic-gate	$(IMPLEMENTATIONS) $(CPU_KMODS)
176*7c478bd9Sstevel@tonic-gate
177*7c478bd9Sstevel@tonic-gate# EXPORT DELETE START
178*7c478bd9Sstevel@tonic-gate
179*7c478bd9Sstevel@tonic-gateEXPORT_SRC:
180*7c478bd9Sstevel@tonic-gate	$(RM) Makefile+
181*7c478bd9Sstevel@tonic-gate	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
182*7c478bd9Sstevel@tonic-gate	    < Makefile > Makefile+
183*7c478bd9Sstevel@tonic-gate	$(MV) Makefile+ Makefile
184*7c478bd9Sstevel@tonic-gate	$(CHMOD) 444 Makefile
185*7c478bd9Sstevel@tonic-gate
186*7c478bd9Sstevel@tonic-gate# EXPORT DELETE END
187*7c478bd9Sstevel@tonic-gate
188*7c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
189*7c478bd9Sstevel@tonic-gate
190*7c478bd9Sstevel@tonic-gate#
191*7c478bd9Sstevel@tonic-gate# Cross-reference customization: build a cross-reference over all of the
192*7c478bd9Sstevel@tonic-gate# sun4u-related directories.
193*7c478bd9Sstevel@tonic-gate#
194*7c478bd9Sstevel@tonic-gateXRDIRS	= ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
195*7c478bd9Sstevel@tonic-gateXRPRUNE = i86pc
196*7c478bd9Sstevel@tonic-gate
197*7c478bd9Sstevel@tonic-gatecscope.out tags: FRC
198*7c478bd9Sstevel@tonic-gate	$(XREF) -x $@
199