xref: /titanic_41/usr/src/uts/sun4u/sunfire/Makefile (revision 29949e866e40b95795203f3ee46f44a197c946e4)
1*29949e86Sstevel#
2*29949e86Sstevel# CDDL HEADER START
3*29949e86Sstevel#
4*29949e86Sstevel# The contents of this file are subject to the terms of the
5*29949e86Sstevel# Common Development and Distribution License (the "License").
6*29949e86Sstevel# You may not use this file except in compliance with the License.
7*29949e86Sstevel#
8*29949e86Sstevel# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*29949e86Sstevel# or http://www.opensolaris.org/os/licensing.
10*29949e86Sstevel# See the License for the specific language governing permissions
11*29949e86Sstevel# and limitations under the License.
12*29949e86Sstevel#
13*29949e86Sstevel# When distributing Covered Code, include this CDDL HEADER in each
14*29949e86Sstevel# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*29949e86Sstevel# If applicable, add the following below this CDDL HEADER, with the
16*29949e86Sstevel# fields enclosed by brackets "[]" replaced with your own identifying
17*29949e86Sstevel# information: Portions Copyright [yyyy] [name of copyright owner]
18*29949e86Sstevel#
19*29949e86Sstevel# CDDL HEADER END
20*29949e86Sstevel#
21*29949e86Sstevel
22*29949e86Sstevel#
23*29949e86Sstevel# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*29949e86Sstevel# Use is subject to license terms.
25*29949e86Sstevel#
26*29949e86Sstevel#ident	"%Z%%M%	%I%	%E% SMI"
27*29949e86Sstevel#
28*29949e86Sstevel#	This makefile drives the production of the sun4u sunfire platform
29*29949e86Sstevel#	module.
30*29949e86Sstevel#
31*29949e86Sstevel#	sun4u implementation architecture dependent
32*29949e86Sstevel#
33*29949e86Sstevel
34*29949e86Sstevel#
35*29949e86Sstevel#	Path to the base of the uts directory tree (usually /usr/src/uts).
36*29949e86Sstevel#
37*29949e86SstevelUTSBASE	  = ../..
38*29949e86Sstevel
39*29949e86Sstevel#
40*29949e86Sstevel#	Include common rules.
41*29949e86Sstevel#
42*29949e86Sstevelinclude $(UTSBASE)/sun4u/sunfire/Makefile.sunfire
43*29949e86Sstevel
44*29949e86Ssteveldef		:=	TARGET= def
45*29949e86Sstevelall		:=	TARGET= all
46*29949e86Sstevelinstall		:=	TARGET= install
47*29949e86Sstevelinstall_h	:=	TARGET= install_h
48*29949e86Sstevelclean		:=	TARGET= clean
49*29949e86Sstevelclobber		:=	TARGET= clobber
50*29949e86Sstevellint		:=	TARGET= lint
51*29949e86Sstevellintlib		:=	TARGET= lintlib
52*29949e86Sstevelmodlintlib	:=	TARGET= modlintlib
53*29949e86Sstevelmodlist		:=	TARGET= modlist
54*29949e86Sstevelmodlist		:=	NO_STATE= -K $$MODSTATE$$$$
55*29949e86Sstevelclean.lint	:=	TARGET= clean.lint
56*29949e86Sstevelcheck		:=	TARGET= check
57*29949e86Sstevel
58*29949e86Sstevel#
59*29949e86Sstevel#	Default build targets.
60*29949e86Sstevel#
61*29949e86Sstevel.KEEP_STATE:
62*29949e86Sstevel
63*29949e86Ssteveldef all clean clean.lint clobber modlist: \
64*29949e86Sstevel	$(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS)
65*29949e86Sstevel
66*29949e86Sstevelmodlintlib:	$(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS)
67*29949e86Sstevel
68*29949e86SstevelIMPLEMENTED_PLATFORM	= SUNW,Ultra-Enterprise
69*29949e86Sstevel
70*29949e86Sstevelinstall:	$(ROOT_SUNFIRE_DIR) $(USR_SUNFIRE_DIR) \
71*29949e86Sstevel		$(USR_SUNFIRE_INC_DIR) \
72*29949e86Sstevel		$(USR_SUNFIRE_SBIN_DIR) \
73*29949e86Sstevel		$(USR_SUNFIRE_LIB_DIR) \
74*29949e86Sstevel		.WAIT $(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS)
75*29949e86Sstevel
76*29949e86Sstevelinstall_h check:	FRC
77*29949e86Sstevel	@cd sys; pwd; $(MAKE) $(TARGET)
78*29949e86Sstevel
79*29949e86Sstevellint:		modlintlib
80*29949e86Sstevel
81*29949e86Sstevel#
82*29949e86Sstevel# The 'lint.platmod' target lints the sunfire platform module against the sun4u
83*29949e86Sstevel# kernel.  This ends up doing all the kernel cross-checks, so it takes a couple
84*29949e86Sstevel# of minutes.  Due to the low ROI, it's not run by default, but it's a good
85*29949e86Sstevel# idea to run this if you change os/sunfire.c.
86*29949e86Sstevel#
87*29949e86SstevelLINT_LIBS	 = $(LINT_LIB) \
88*29949e86Sstevel		   -L$(SUNFIRE_LINT_LIB_DIR) \
89*29949e86Sstevel		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
90*29949e86Sstevel		       $(CLOSED_LINT_KMODS:%=-l%) \
91*29949e86Sstevel		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
92*29949e86Sstevel
93*29949e86Sstevellint.platmod:	modlintlib
94*29949e86Sstevel	@-$(ECHO) "\nSunfire Platform-dependent module: global crosschecks:"
95*29949e86Sstevel	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
96*29949e86Sstevel
97*29949e86Sstevel$(SUNFIRE_KMODS): FRC
98*29949e86Sstevel	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
99*29949e86Sstevel
100*29949e86Sstevel$(CLOSED_SUNFIRE_KMODS): FRC
101*29949e86Sstevel	@cd $(CLOSED)/uts/sun4u/sunfire/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
102*29949e86Sstevel
103*29949e86Sstevel#
104*29949e86Sstevel#	Include common targets.
105*29949e86Sstevel#
106*29949e86Sstevelinclude $(UTSBASE)/sun4u/sunfire/Makefile.targ
107