Makefile revision 49126f4ee0c35e5a0877255000316089c82e6f7e
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico #
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# CDDL HEADER START
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# The contents of this file are subject to the terms of the
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# Common Development and Distribution License (the "License").
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# You may not use this file except in compliance with the License.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# or http://www.opensolaris.org/os/licensing.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# See the License for the specific language governing permissions
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# and limitations under the License.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# When distributing Covered Code, include this CDDL HEADER in each
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# If applicable, add the following below this CDDL HEADER, with the
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# fields enclosed by brackets "[]" replaced with your own identifying
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# information: Portions Copyright [yyyy] [name of copyright owner]
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# CDDL HEADER END
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# Use is subject to license terms.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# ident "%Z%%M% %I% %E% SMI"
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# This makefile drives the production of all implementation architecture
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# dependent modules for the sun4v architecture.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoUTSBASE = ..
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinclude Makefile.sun4v
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinclude Makefile.stpaul
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinclude Makefile.huron
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinclude Makefile.maramba
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinclude Makefile.thunder
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinclude Makefile.turgo
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinclude Makefile.congo
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoUSR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoUSR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoUSR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# The following are SPARC specific (rather than sun4v) specific modules
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# which are required for the sun4v kernel to completely lint. They are
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# not involved in the build in any other way. In order to minimize
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# build time, it is assumed that they are up to date. But since sun4v
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# is really a separate architecture we cannot use the v7 sparc modules.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoSPARC_LINTS =
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoLINT_LIBS = $(LINT_LIB) \
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# EXPORT DELETE START
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# They need to be listed separately since they duplicate global symbols
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# should not be listed in the lint target.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# Don't build this for OpenSolaris, since it will be replaced by
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# a binary that is signed by Sun RE.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico#
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# EXPORT DELETE END
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicodef := TARGET= def
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoall := TARGET= all
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinstall := TARGET= install
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoinstall_h := TARGET= install_h
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoclean := TARGET= clean
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoclobber := TARGET= clobber
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicolint := TARGET= lint
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicolintlib := TARGET= lintlib
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicomodlintlib := TARGET= modlintlib
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicomodlist := TARGET= modlist
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicomodlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicoclean.lint := TARGET= clean.lint
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicocheck := TARGET= check
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico.KEEP_STATE:
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico modlist modlist.sparc
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# Override for CPU_KMODS... they cannot be built
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# in parallel
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico.NO_PARALLEL: $(CPU_KMODS)
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicodef all clean clobber clean.lint: genassym unix .WAIT \
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# list the modules under sun4v.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicomodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico $(IMPLEMENTATIONS)
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico# list the modules for Install -k sun4v.
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNicomodlist.karch: modlist modlist.sparc
a13531703adeeb1b8b4b9beca2499a51e37b36adJazzyNico
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)
#
# 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)
#
# 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 $@