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