xref: /titanic_51/usr/src/uts/sparc/Makefile (revision d62bc4badc1c1f1549c961cfb8b420e650e1272b)
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 2007 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_KMODLIBS	 = $(LINT_KMODS:e1000g=)
39LINT_LIBS	 = $(LINT_LIB) $(GEN_LINT_LIB) \
40		   $(LINT_KMODLIBS:%=$(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
45$(CLOSED_BUILD)LINT_LIBS	+= $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
46LINT_LIBS	+= $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
47$(CLOSED_BUILD)LINT_LIBS += $(CLOSED_XMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
48
49DRV_KMODS	+= dprov
50
51#
52# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
53# They need to be listed separately since they duplicate global symbols
54# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
55# should not be listed in the lint target.
56#
57# Don't build these for OpenSolaris, since they will be replaced by
58# binaries that are signed by Sun RE.
59#
60$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= aes256
61$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= arcfour2048
62$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= blowfish448
63# EXPORT DELETE END
64
65#
66#
67#
68def		:=	TARGET= def
69all		:=	TARGET= all
70install		:=	TARGET= install
71clean		:=	TARGET= clean
72clobber		:=	TARGET= clobber
73lint		:=	TARGET= lint
74modlintlib	:=	TARGET= modlintlib
75modlist		:=	TARGET= modlist
76modlist		:=	NO_STATE= -K $$MODSTATE$$$$
77clean.lint	:=	TARGET= clean.lint
78check		:=	TARGET= check
79install_h	:=	TARGET= install_h
80
81.KEEP_STATE:
82
83.PARALLEL:	$(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \
84		$(CLOSED_XMODS) config $(LINT_DEPS)
85
86def all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) $(SVVS) \
87	$(XMODS) $(CLOSED_XMODS) config
88
89modlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
90	$(XMODS) $(CLOSED_XMODS)
91
92$(KMODS) config:	FRC
93	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
94
95$(CLOSED_KMODS):	FRC
96	cd $(CLOSED)/uts/sparc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
97
98$(XMODS):	FRC
99	@if [ -f $@/Makefile  ]; then \
100		cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
101	else \
102		true; \
103	fi
104
105$(SVVS) $(CLOSED_XMODS):	FRC
106	@if [ -f $(CLOSED)/uts/sparc/$@/Makefile  ]; then \
107		cd $(CLOSED)/uts/sparc/$@; pwd; \
108		    $(MAKE) $(NO_STATE) $(TARGET); \
109	else \
110		true; \
111	fi
112
113install_h check:	FRC
114	@cd asm; pwd; $(MAKE) $(TARGET)
115	@cd sys; pwd; $(MAKE) $(TARGET)
116	@cd v7/sys; pwd; $(MAKE) $(TARGET)
117	@cd v9/sys; pwd; $(MAKE) $(TARGET)
118
119#
120#	Full kernel lint target.
121#
122LINT_TARGET	= globallint
123
124globallint:
125	@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
126	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
127
128lint:	modlintlib .WAIT $(LINT_DEPS)
129
130# EXPORT DELETE START
131
132EXPORT_SRC:
133	$(RM) Makefile+
134	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
135	    < Makefile > Makefile+
136	$(MV) Makefile+ Makefile
137	$(CHMOD) 444 Makefile
138
139# EXPORT DELETE END
140
141include ../Makefile.targ
142