Makefile revision c0e7977a434048a8bc7386ea0e8befaa77a646cf
198N/A #
198N/A# CDDL HEADER START
198N/A#
198N/A# The contents of this file are subject to the terms of the
198N/A# Common Development and Distribution License (the "License").
198N/A# You may not use this file except in compliance with the License.
198N/A#
198N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
198N/A# or http://www.opensolaris.org/os/licensing.
198N/A# See the License for the specific language governing permissions
198N/A# and limitations under the License.
198N/A#
198N/A# When distributing Covered Code, include this CDDL HEADER in each
198N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
198N/A# If applicable, add the following below this CDDL HEADER, with the
198N/A# fields enclosed by brackets "[]" replaced with your own identifying
198N/A# information: Portions Copyright [yyyy] [name of copyright owner]
198N/A#
198N/A# CDDL HEADER END
198N/A#
198N/A#
198N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1579N/A# Use is subject to license terms.
198N/A#
198N/A# This makefile drives the production of all implementation architecture
198N/A# dependent modules for the sun4v architecture.
198N/A#
198N/A
198N/AUTSBASE = ..
198N/A
1935N/Ainclude Makefile.sun4v
379N/Ainclude Makefile.stpaul
379N/Ainclude Makefile.huron
198N/Ainclude Makefile.maramba
379N/Ainclude Makefile.thunder
379N/Ainclude Makefile.turgo
1935N/Ainclude Makefile.congo
379N/Ainclude Makefile.monza
1935N/A
198N/AUSR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320
1258N/AUSR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin
1258N/AUSR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib
198N/A
198N/A
198N/A#
198N/A# The following are SPARC specific (rather than sun4v) specific modules
379N/A# which are required for the sun4v kernel to completely lint. They are
379N/A# not involved in the build in any other way. In order to minimize
379N/A# build time, it is assumed that they are up to date. But since sun4v
379N/A# is really a separate architecture we cannot use the v7 sparc modules.
379N/A#
379N/ASPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
1935N/A
1935N/ASPARC_LINTS =
1935N/A
1935N/A#
1935N/A#
1935N/A#
1935N/ALINT_LIBS = $(LINT_LIB) \
1935N/A $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
1935N/A $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
1935N/A $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
1935N/A
1935N/Adef := TARGET= def
1935N/Aall := TARGET= all
1935N/Ainstall := TARGET= install
1935N/Ainstall_h := TARGET= install_h
1935N/Aclean := TARGET= clean
379N/Aclobber := TARGET= clobber
198N/Alint := TARGET= lint
198N/Alintlib := TARGET= lintlib
1935N/Amodlintlib := TARGET= modlintlib
198N/Amodlist := TARGET= modlist
1579N/Amodlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
1579N/Aclean.lint := TARGET= clean.lint
1579N/Acheck := TARGET= check
1579N/A
198N/A.KEEP_STATE:
198N/A
198N/A.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
1579N/A modlist modlist.sparc
198N/A
1579N/A# Override for CPU_KMODS... they cannot be built
198N/A# in parallel
198N/A.NO_PARALLEL: $(CPU_KMODS)
198N/A
1579N/Adef all clean clobber clean.lint: genassym unix .WAIT \
1579N/A $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
1579N/A
1579N/A# list the modules under sun4v.
1579N/Amodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
1579N/A $(IMPLEMENTATIONS)
198N/A
1579N/A# list the modules for Install -k sun4v.
1579N/Amodlist.karch: modlist modlist.sparc
198N/A
1579N/Amodlist.sparc:
1579N/A @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
1579N/A
1579N/Ainstall: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
1579N/A $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
198N/A
379N/Alintlib: unix
379N/A
379N/Amodlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
379N/A
379N/Agenassym unix $(KMODS): FRC
379N/A @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
379N/A
379N/A$(IMPLEMENTATIONS): FRC
379N/A @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
379N/A
379N/A$(XMODS): FRC
379N/A @if [ -f $@/Makefile ]; then \
379N/A cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
379N/A else \
198N/A true; \
2032N/A fi
2032N/A
2032N/A$(CLOSED_XMODS): FRC
2032N/A @if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \
2032N/A cd $(CLOSED)/uts/sun4v/$@; pwd; \
198N/A $(MAKE) $(NO_STATE) $(TARGET); \
198N/A else \
198N/A true; \
198N/A fi
198N/A
198N/A$(CLOSED_KMODS): FRC
198N/A cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
198N/A
198N/Ainstall_h check: install_platforms $(IMPLEMENTATIONS) FRC
198N/A @cd sys; pwd; $(MAKE) $(TARGET)
198N/A @cd vm; pwd; $(MAKE) $(TARGET)
198N/A
198N/A#
885N/A# Rules for the /platforms directories. This is hardwired here because
885N/A# the first stage of the project (KBI) only implements the userland
198N/A# changes, but the only reasonable place to record the aliases is
198N/A# here in kernel land.
198N/A#
198N/A$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
198N/A -$(INS.dir)
198N/A
1579N/A$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
198N/A $(INS.slink1)
1579N/A
198N/A#
1579N/A# create directories in /usr/platform/ for the implementations that are
198N/A# defined in $(IMPLEMENTED_PLATFORM)
198N/A#
198N/A
198N/A# 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)
#
# 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)
#
# 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)
$(USR_STPAUL_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_STPAUL_SBIN_DIR): $(USR_STPAUL_DIR)
$(INS.slink5)
$(USR_STPAUL_LIB_DIR): $(USR_STPAUL_DIR)
-$(INS.dir)
$(USR_HURON_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_HURON_SBIN_DIR): $(USR_HURON_DIR)
$(INS.slink5)
$(USR_HURON_LIB_DIR): $(USR_HURON_DIR)
-$(INS.dir)
$(USR_GLENDALE_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_GLENDALE_SBIN_DIR): $(USR_GLENDALE_DIR)
$(INS.slink5)
$(USR_GLENDALE_LIB_DIR): $(USR_GLENDALE_DIR)
-$(INS.dir)
$(USR_MARAMBA_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_MARAMBA_SBIN_DIR): $(USR_MARAMBA_DIR)
$(INS.slink5)
$(USR_MARAMBA_LIB_DIR): $(USR_MARAMBA_DIR)
-$(INS.dir)
$(USR_THUNDER_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_THUNDER_SBIN_DIR): $(USR_THUNDER_DIR)
$(INS.slink5)
$(USR_THUNDER_LIB_DIR): $(USR_THUNDER_DIR)
-$(INS.dir)
$(USR_TURGO_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_TURGO_SBIN_DIR): $(USR_TURGO_DIR)
$(INS.slink5)
$(USR_TURGO_LIB_DIR): $(USR_TURGO_DIR)
-$(INS.dir)
$(USR_CONGO_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_CONGO_SBIN_DIR): $(USR_CONGO_DIR)
$(INS.slink5)
$(USR_CONGO_LIB_DIR): $(USR_CONGO_DIR)
-$(INS.dir)
$(USR_MONZA_DIR): $(USR_SUN4V_PLAT_DIR)
-$(INS.dir)
$(USR_MONZA_SBIN_DIR): $(USR_MONZA_DIR)
-$(INS.dir)
$(USR_MONZA_SBIN_LINKS): $(USR_MONZA_SBIN_DIR)
$(INS.slink7)
#
# 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) $(LINT_CPU_KMODS)
include ../Makefile.targ
#
# Cross-reference customization: build a cross-reference over all of the
# sun4v-related directories.
#
XRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common
XRPRUNE = i86pc sun4u intel
cscope.out tags: FRC
$(XREF) -x $@