xref: /titanic_44/usr/src/uts/sparc/Makefile (revision d00756ccb34596a328f8a15d1965da5412d366d0)
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#ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# uts/sparc/Makefile
28#
29#	This makefile drives the production of all implementation architecture
30#	independent modules for the SPARC processor. (For those unsure, this
31#	means the module will run on all SPARC processor based machines
32#	running SunOS.)
33
34UTSBASE = ..
35
36include Makefile.sparc
37
38LINT_KMODS_X1	= $(LINT_KMODS:nsmb=)
39LINT_KMODS_X2	= $(LINT_KMODS_X1:smbfs=)
40LINT_KMODLIBS	= $(LINT_KMODS_X2:e1000g=)
41LINT_LIBS	= $(LINT_LIB) $(GEN_LINT_LIB) \
42		  $(LINT_KMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
43
44$(CLOSED_BUILD)LINT_LIBS += $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
45
46# EXPORT DELETE START
47$(CLOSED_BUILD)LINT_LIBS	+= $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
48LINT_LIBS	+= $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
49$(CLOSED_BUILD)LINT_LIBS += $(CLOSED_XMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
50
51DRV_KMODS	+= dprov
52
53#
54# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
55# They need to be listed separately since they duplicate global symbols
56# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
57# should not be listed in the lint target.
58#
59# Don't build these for OpenSolaris, since they will be replaced by
60# binaries that are signed by Sun RE.
61#
62$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= aes256
63$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= arcfour2048
64$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= blowfish448
65# EXPORT DELETE END
66
67#
68#
69#
70def		:=	TARGET= def
71all		:=	TARGET= all
72install		:=	TARGET= install
73clean		:=	TARGET= clean
74clobber		:=	TARGET= clobber
75lint		:=	TARGET= lint
76modlintlib	:=	TARGET= modlintlib
77modlist		:=	TARGET= modlist
78modlist		:=	NO_STATE= -K $$MODSTATE$$$$
79clean.lint	:=	TARGET= clean.lint
80check		:=	TARGET= check
81install_h	:=	TARGET= install_h
82
83.KEEP_STATE:
84
85.PARALLEL:	$(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \
86		$(CLOSED_XMODS) config $(LINT_DEPS)
87
88def all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) $(SVVS) \
89	$(XMODS) $(CLOSED_XMODS) config
90
91modlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
92	$(XMODS) $(CLOSED_XMODS)
93
94$(KMODS) config:	FRC
95	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
96
97$(CLOSED_KMODS):	FRC
98	cd $(CLOSED)/uts/sparc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
99
100$(XMODS):	FRC
101	@if [ -f $@/Makefile  ]; then \
102		cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
103	else \
104		true; \
105	fi
106
107$(SVVS) $(CLOSED_XMODS):	FRC
108	@if [ -f $(CLOSED)/uts/sparc/$@/Makefile  ]; then \
109		cd $(CLOSED)/uts/sparc/$@; pwd; \
110		    $(MAKE) $(NO_STATE) $(TARGET); \
111	else \
112		true; \
113	fi
114
115install_h check:	FRC
116	@cd asm; pwd; $(MAKE) $(TARGET)
117	@cd sys; pwd; $(MAKE) $(TARGET)
118	@cd v7/sys; pwd; $(MAKE) $(TARGET)
119	@cd v9/sys; pwd; $(MAKE) $(TARGET)
120
121#
122#	Full kernel lint target.
123#
124LINT_TARGET	= globallint
125
126globallint:
127	@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
128	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
129
130lint:	modlintlib .WAIT $(LINT_DEPS)
131
132# EXPORT DELETE START
133
134EXPORT_SRC:
135	$(RM) Makefile+
136	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
137	    < Makefile > Makefile+
138	$(MV) Makefile+ Makefile
139	$(CHMOD) 444 Makefile
140
141# EXPORT DELETE END
142
143include ../Makefile.targ
144