Makefile revision aba6a64cda8fc853e4d61f08c163d0b9be0815b2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte #
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# ident "%Z%%M% %I% %E% SMI"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# This makefile drives the production of all implementation architecture
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# dependent modules for the sun4v architecture.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUTSBASE = ..
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.sun4v
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.stpaul
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.huron
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.maramba
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.thunder
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.turgo
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.congo
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.monza
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude Makefile.lightning
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUSR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUSR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUSR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The following are SPARC specific (rather than sun4v) specific modules
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# which are required for the sun4v kernel to completely lint. They are
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# not involved in the build in any other way. In order to minimize
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# build time, it is assumed that they are up to date. But since sun4v
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# is really a separate architecture we cannot use the v7 sparc modules.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSPARC_LINTS =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINT_LIBS = $(LINT_LIB) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
# EXPORT DELETE START
#
# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
# They need to be listed separately since they duplicate global symbols
# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
# should not be listed in the lint target.
#
# Don't build this for OpenSolaris, since it will be replaced by
# a binary that is signed by Sun RE.
#
$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048
# EXPORT DELETE END
def := TARGET= def
all := TARGET= all
install := TARGET= install
install_h := TARGET= install_h
clean := TARGET= clean
clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
modlist := TARGET= modlist
modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
.KEEP_STATE:
.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
modlist modlist.sparc
# Override for CPU_KMODS... they cannot be built
# in parallel
.NO_PARALLEL: $(CPU_KMODS)
def all clean clobber clean.lint: genassym unix .WAIT \
$(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
# list the modules under sun4v.
modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
$(IMPLEMENTATIONS)
# list the modules for Install -k sun4v.
modlist.karch: modlist modlist.sparc
modlist.sparc:
@cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
$(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
lintlib: unix
modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
genassym unix $(KMODS): FRC
@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(IMPLEMENTATIONS): FRC
@cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
$(XMODS): FRC
@if [ -f $@/Makefile ]; then \
cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
$(CLOSED_XMODS): FRC
@if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \
cd $(CLOSED)/uts/sun4v/$@; pwd; \
$(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
$(CLOSED_KMODS): FRC
cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
install_h check: install_platforms $(IMPLEMENTATIONS) FRC
@cd sys; pwd; $(MAKE) $(TARGET)
@cd vm; pwd; $(MAKE) $(TARGET)
#
# Rules for the /platforms directories. This is hardwired here because
# the first stage of the project (KBI) only implements the userland
# changes, but the only reasonable place to record the aliases is
# here in kernel land.
#
$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
-$(INS.dir.root.sys)
$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
$(INS.slink1)
#
# create directories in /usr/platform/ for the implementations that are
# defined in $(IMPLEMENTED_PLATFORM)
#
# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
# that are linked to it.
#
$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
-$(INS.dir.root.sys)
#
# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
# to it's corresponding $(IMPLEMENTED_PLATFORM).
#
PLATFORMS = $(LINKED_PLATFORMS)
$(USR_PLAT_DIRS): $(USR_PLAT_DIR)
$(INS.slink3)
PLATFORMS += $(IMPLEMENTED_PLATFORM)
#
# Make the /platforms directories. This is hardwired here because
# the first stage of the project (KBI) only implements the userland
# changes, but the only reasonable place to record the aliases is
# here in kernel land.
#
install_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
$(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
$(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
$(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR) \
$(USR_STPAUL_DIR) $(USR_STPAUL_SBIN_DIR) \
$(USR_STPAUL_LIB_DIR) \
$(USR_GLENDALE_DIR) $(USR_GLENDALE_SBIN_DIR) \
$(USR_GLENDALE_LIB_DIR) \
$(USR_HURON_DIR) \
$(USR_HURON_SBIN_DIR) $(USR_HURON_LIB_DIR) \
$(USR_MARAMBA_DIR) $(USR_MARAMBA_SBIN_DIR) \
$(USR_MARAMBA_LIB_DIR) \
$(USR_THUNDER_DIR) $(USR_THUNDER_SBIN_DIR) \
$(USR_THUNDER_LIB_DIR) \
$(USR_TURGO_DIR) $(USR_TURGO_SBIN_DIR) \
$(USR_TURGO_LIB_DIR) \
$(USR_CONGO_DIR) $(USR_CONGO_SBIN_DIR) \
$(USR_CONGO_LIB_DIR) \
$(USR_MONZA_DIR) \
$(USR_MONZA_SBIN_DIR) $(USR_MONZA_SBIN_LINKS) \
$(USR_LIGHTNING_DIR) $(USR_LIGHTNING_SBIN_DIR) \
$(USR_LIGHTNING_LIB_DIR)
#
# rules for making include, sbin, lib dirs/links in
# /usr/platform/$(PLATFORM)/ for desktop platforms
#
$(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
$(INS.slink4)
$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
$(INS.slink5)
$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
-$(INS.dir.root.bin)
$(USR_STPAUL_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_STPAUL_SBIN_DIR): $(USR_STPAUL_DIR)
$(INS.slink5)
$(USR_STPAUL_LIB_DIR): $(USR_STPAUL_DIR)
-$(INS.dir.root.bin)
$(USR_HURON_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_HURON_SBIN_DIR): $(USR_HURON_DIR)
$(INS.slink5)
$(USR_HURON_LIB_DIR): $(USR_HURON_DIR)
-$(INS.dir.root.bin)
$(USR_GLENDALE_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_GLENDALE_SBIN_DIR): $(USR_GLENDALE_DIR)
$(INS.slink5)
$(USR_GLENDALE_LIB_DIR): $(USR_GLENDALE_DIR)
-$(INS.dir.root.bin)
$(USR_MARAMBA_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_MARAMBA_SBIN_DIR): $(USR_MARAMBA_DIR)
$(INS.slink5)
$(USR_MARAMBA_LIB_DIR): $(USR_MARAMBA_DIR)
-$(INS.dir.root.bin)
$(USR_THUNDER_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_THUNDER_SBIN_DIR): $(USR_THUNDER_DIR)
$(INS.slink5)
$(USR_THUNDER_LIB_DIR): $(USR_THUNDER_DIR)
-$(INS.dir.root.bin)
$(USR_TURGO_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_TURGO_SBIN_DIR): $(USR_TURGO_DIR)
$(INS.slink5)
$(USR_TURGO_LIB_DIR): $(USR_TURGO_DIR)
-$(INS.dir.root.bin)
$(USR_CONGO_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_CONGO_SBIN_DIR): $(USR_CONGO_DIR)
$(INS.slink5)
$(USR_CONGO_LIB_DIR): $(USR_CONGO_DIR)
-$(INS.dir.root.bin)
$(USR_MONZA_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_MONZA_SBIN_DIR): $(USR_MONZA_DIR)
-$(INS.dir.root.sys)
$(USR_MONZA_SBIN_LINKS): $(USR_MONZA_SBIN_DIR)
$(INS.slink7)
$(USR_LIGHTNING_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir.root.sys)
$(USR_LIGHTNING_SBIN_DIR): $(USR_LIGHTNING_DIR)
$(INS.slink5)
$(USR_LIGHTNING_LIB_DIR): $(USR_LIGHTNING_DIR)
-$(INS.dir.root.bin)
#
# Full kernel lint target.
#
LINT_TARGET = globallint
globallint:
@-$(ECHO) "\nSUN4V KERNEL: global crosschecks:"
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
$(IMPLEMENTATIONS)
# EXPORT DELETE START
EXPORT_SRC:
$(RM) Makefile+
sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
< Makefile > Makefile+
$(MV) Makefile+ Makefile
$(CHMOD) 444 Makefile
# EXPORT DELETE END
include ../Makefile.targ
#
# Cross-reference customization: build a cross-reference over all of the
# sun4v-related directories.
#
SHARED_XRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common
CLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
XRDIRS = $(SHARED_XRDIRS)
$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
XRPRUNE = i86pc sun4u intel
cscope.out tags: FRC
$(XREF) -x $@