xref: /titanic_51/usr/src/uts/sparc/Makefile (revision 89b43686db1fe9681d80a7cf5662730cb9378cae)
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# EXPORT DELETE END
54
55def		:=	TARGET= def
56all		:=	TARGET= all
57install		:=	TARGET= install
58clean		:=	TARGET= clean
59clobber		:=	TARGET= clobber
60lint		:=	TARGET= lint
61modlintlib	:=	TARGET= modlintlib
62modlist		:=	TARGET= modlist
63modlist		:=	NO_STATE= -K $$MODSTATE$$$$
64clean.lint	:=	TARGET= clean.lint
65check		:=	TARGET= check
66install_h	:=	TARGET= install_h
67
68.KEEP_STATE:
69
70.PARALLEL:	$(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \
71		$(CLOSED_XMODS) config $(LINT_DEPS)
72
73def all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) $(SVVS) \
74	$(XMODS) $(CLOSED_XMODS) config
75
76modlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
77	$(XMODS) $(CLOSED_XMODS)
78
79$(KMODS) config:	FRC
80	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
81
82$(CLOSED_KMODS):	FRC
83	cd $(CLOSED)/uts/sparc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
84
85$(XMODS):	FRC
86	@if [ -f $@/Makefile  ]; then \
87		cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
88	else \
89		true; \
90	fi
91
92$(SVVS) $(CLOSED_XMODS):	FRC
93	@if [ -f $(CLOSED)/uts/sparc/$@/Makefile  ]; then \
94		cd $(CLOSED)/uts/sparc/$@; pwd; \
95		    $(MAKE) $(NO_STATE) $(TARGET); \
96	else \
97		true; \
98	fi
99
100install_h check:	FRC
101	@cd asm; pwd; $(MAKE) $(TARGET)
102	@cd sys; pwd; $(MAKE) $(TARGET)
103	@cd v7/sys; pwd; $(MAKE) $(TARGET)
104	@cd v9/sys; pwd; $(MAKE) $(TARGET)
105
106#
107#	Full kernel lint target.
108#
109LINT_TARGET	= globallint
110
111globallint:
112	@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
113	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
114
115lint:	modlintlib .WAIT $(LINT_DEPS)
116
117# EXPORT DELETE START
118
119EXPORT_SRC:
120	$(RM) Makefile+
121	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
122	    < Makefile > Makefile+
123	$(MV) Makefile+ Makefile
124	$(CHMOD) 444 Makefile
125
126# EXPORT DELETE END
127
128include ../Makefile.targ
129