Makefile revision 29949e866e40b95795203f3ee46f44a197c946e4
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# CDDL HEADER START
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# The contents of this file are subject to the terms of the
29949e866e40b95795203f3ee46f44a197c946e4stevel# Common Development and Distribution License (the "License").
29949e866e40b95795203f3ee46f44a197c946e4stevel# You may not use this file except in compliance with the License.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29949e866e40b95795203f3ee46f44a197c946e4stevel# or http://www.opensolaris.org/os/licensing.
29949e866e40b95795203f3ee46f44a197c946e4stevel# See the License for the specific language governing permissions
29949e866e40b95795203f3ee46f44a197c946e4stevel# and limitations under the License.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# When distributing Covered Code, include this CDDL HEADER in each
29949e866e40b95795203f3ee46f44a197c946e4stevel# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29949e866e40b95795203f3ee46f44a197c946e4stevel# If applicable, add the following below this CDDL HEADER, with the
29949e866e40b95795203f3ee46f44a197c946e4stevel# fields enclosed by brackets "[]" replaced with your own identifying
29949e866e40b95795203f3ee46f44a197c946e4stevel# information: Portions Copyright [yyyy] [name of copyright owner]
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# CDDL HEADER END
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
29949e866e40b95795203f3ee46f44a197c946e4stevel# Use is subject to license terms.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel#ident "%Z%%M% %I% %E% SMI"
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# This makefile drives the production of the sun4u sunfire platform
29949e866e40b95795203f3ee46f44a197c946e4stevel# module.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# sun4u implementation architecture dependent
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# Path to the base of the uts directory tree (usually /usr/src/uts).
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevelUTSBASE = ../..
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# Include common rules.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevelinclude $(UTSBASE)/sun4u/sunfire/Makefile.sunfire
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4steveldef := TARGET= def
29949e866e40b95795203f3ee46f44a197c946e4stevelall := TARGET= all
29949e866e40b95795203f3ee46f44a197c946e4stevelinstall := TARGET= install
29949e866e40b95795203f3ee46f44a197c946e4stevelinstall_h := TARGET= install_h
29949e866e40b95795203f3ee46f44a197c946e4stevelclean := TARGET= clean
29949e866e40b95795203f3ee46f44a197c946e4stevelclobber := TARGET= clobber
29949e866e40b95795203f3ee46f44a197c946e4stevellint := TARGET= lint
29949e866e40b95795203f3ee46f44a197c946e4stevellintlib := TARGET= lintlib
29949e866e40b95795203f3ee46f44a197c946e4stevelmodlintlib := TARGET= modlintlib
29949e866e40b95795203f3ee46f44a197c946e4stevelmodlist := TARGET= modlist
29949e866e40b95795203f3ee46f44a197c946e4stevelmodlist := NO_STATE= -K $$MODSTATE$$$$
29949e866e40b95795203f3ee46f44a197c946e4stevelclean.lint := TARGET= clean.lint
29949e866e40b95795203f3ee46f44a197c946e4stevelcheck := TARGET= check
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# Default build targets.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel.KEEP_STATE:
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4steveldef all clean clean.lint clobber modlist: \
29949e866e40b95795203f3ee46f44a197c946e4stevel $(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevelmodlintlib: $(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevelIMPLEMENTED_PLATFORM = SUNW,Ultra-Enterprise
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevelinstall: $(ROOT_SUNFIRE_DIR) $(USR_SUNFIRE_DIR) \
29949e866e40b95795203f3ee46f44a197c946e4stevel $(USR_SUNFIRE_INC_DIR) \
29949e866e40b95795203f3ee46f44a197c946e4stevel $(USR_SUNFIRE_SBIN_DIR) \
29949e866e40b95795203f3ee46f44a197c946e4stevel $(USR_SUNFIRE_LIB_DIR) \
29949e866e40b95795203f3ee46f44a197c946e4stevel .WAIT $(SUNFIRE_KMODS) $(CLOSED_SUNFIRE_KMODS)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevelinstall_h check: FRC
29949e866e40b95795203f3ee46f44a197c946e4stevel @cd sys; pwd; $(MAKE) $(TARGET)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevellint: modlintlib
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# The 'lint.platmod' target lints the sunfire platform module against the sun4u
29949e866e40b95795203f3ee46f44a197c946e4stevel# kernel. This ends up doing all the kernel cross-checks, so it takes a couple
29949e866e40b95795203f3ee46f44a197c946e4stevel# of minutes. Due to the low ROI, it's not run by default, but it's a good
29949e866e40b95795203f3ee46f44a197c946e4stevel# idea to run this if you change os/sunfire.c.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevelLINT_LIBS = $(LINT_LIB) \
29949e866e40b95795203f3ee46f44a197c946e4stevel -L$(SUNFIRE_LINT_LIB_DIR) \
29949e866e40b95795203f3ee46f44a197c946e4stevel -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
29949e866e40b95795203f3ee46f44a197c946e4stevel $(CLOSED_LINT_KMODS:%=-l%) \
29949e866e40b95795203f3ee46f44a197c946e4stevel -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevellint.platmod: modlintlib
29949e866e40b95795203f3ee46f44a197c946e4stevel @-$(ECHO) "\nSunfire Platform-dependent module: global crosschecks:"
29949e866e40b95795203f3ee46f44a197c946e4stevel @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel$(SUNFIRE_KMODS): FRC
29949e866e40b95795203f3ee46f44a197c946e4stevel @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel$(CLOSED_SUNFIRE_KMODS): FRC
29949e866e40b95795203f3ee46f44a197c946e4stevel @cd $(CLOSED)/uts/sun4u/sunfire/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
29949e866e40b95795203f3ee46f44a197c946e4stevel
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevel# Include common targets.
29949e866e40b95795203f3ee46f44a197c946e4stevel#
29949e866e40b95795203f3ee46f44a197c946e4stevelinclude $(UTSBASE)/sun4u/sunfire/Makefile.targ