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