Makefile revision fb9f9b975cb9214fec5dab37d461199adab9b964
0N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License, Version 1.0 only
0N/A# (the "License"). You may not use this file except in compliance
0N/A# with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
873N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A#
0N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
0N/A# Use is subject to license terms.
5085N/A#
0N/A# ident "%Z%%M% %I% %E% SMI"
0N/A#
5085N/A# This makefile drives the production of all implementation architecture
2086N/A# dependent modules for the sun4u architecture.
0N/A#
0N/A
0N/AUTSBASE = ..
0N/A
0N/Ainclude Makefile.sun4u
204N/A
204N/A#
0N/A# The following are SPARC specific (rather than sun4u) specific modules
0N/A# which are required for the sun4u kernel to completely lint. They are
0N/A# not involved in the build in any other way. In order to minimize
0N/A# build time, it is assumed that they are up to date. But since sun4u
112N/A# is really a separate architecture we cannot use the v7 sparc modules.
0N/A#
0N/ASPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
0N/A
0N/ASPARC_LINTS =
0N/A
0N/A#
0N/A#
4134N/A#
0N/ALINT_LIBS = $(LINT_LIB) \
2109N/A $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
0N/A $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
0N/A $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
0N/A
0N/A# EXPORT DELETE START
0N/A#
0N/A# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
0N/A# They need to be listed separately since they duplicate global symbols
0N/A# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
1177N/A# should not be listed in the lint target.
1400N/A#
2086N/A# Don't build these for OpenSolaris, since they will be replaced by
0N/A# binaries that are signed by Sun RE.
0N/A#
536N/A$(CLOSED_BUILD)CRYPTO_EK_KMODS += aes256
1060N/A$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048
5085N/A# EXPORT DELETE END
4134N/A
0N/A
0N/Adef := TARGET= def
0N/Aall := TARGET= all
0N/Ainstall := TARGET= install
0N/Ainstall_h := TARGET= install_h
0N/Aclean := TARGET= clean
0N/Aclobber := TARGET= clobber
0N/Alint := TARGET= lint
0N/Alintlib := TARGET= lintlib
1400N/Amodlintlib := TARGET= modlintlib
1400N/Amodlist := TARGET= modlist
1400N/Amodlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
1400N/Aclean.lint := TARGET= clean.lint
1400N/Acheck := TARGET= check
868N/A
0N/A.KEEP_STATE:
0N/A
0N/A.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
0N/A $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) \
0N/A modlist modlist.sparc
112N/A
112N/A# Override for CPU_KMODS... they cannot be built
112N/A# in parallel
204N/A.NO_PARALLEL: $(CPU_KMODS)
204N/A
204N/Adef all clean clobber clean.lint: genassym unix .WAIT \
204N/A $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
204N/A $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
204N/A
4914N/A# list the modules under sun4u.
4914N/Amodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
4914N/A $(IMPLEMENTATIONS:.WAIT=) $(CLOSED_IMPLEMENTATIONS)
112N/A
112N/A# list the modules for Install -k sun4u.
0N/Amodlist.karch: modlist modlist.sparc
0N/A
0N/Amodlist.sparc:
112N/A @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
204N/A
204N/Ainstall: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
0N/A $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
204N/A
204N/Alintlib: unix
0N/A
112N/Amodlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
204N/A
204N/Agenassym unix $(KMODS): FRC
0N/A @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
0N/A
0N/A$(IMPLEMENTATIONS): FRC
0N/A @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
0N/A
0N/A$(CLOSED_IMPLEMENTATIONS): FRC
0N/A cd $(CLOSED)/uts/sun4u/$@; pwd; \
0N/A THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET); \
0N/A
0N/A$(XMODS): FRC
0N/A @if [ -f $@/Makefile ]; then \
0N/A cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
0N/A else \
0N/A true; \
0N/A fi
0N/A
0N/A$(CLOSED_XMODS): FRC
0N/A @if [ -f $(CLOSED)/uts/sun4u/$@/Makefile ]; then \
0N/A cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
0N/A else \
0N/A true; \
0N/A fi
0N/A
0N/A$(CLOSED_KMODS): FRC
112N/A cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
0N/A
0N/Ainstall_h check: install_platforms $(IMPLEMENTATIONS) \
0N/A $(CLOSED_IMPLEMENTATIONS) FRC
0N/A @cd sys; pwd; $(MAKE) $(TARGET)
0N/A @cd vm; pwd; $(MAKE) $(TARGET)
0N/A
0N/A#
0N/A# Rules for the /platforms directories. This is hardwired here because
0N/A# the first stage of the project (KBI) only implements the userland
0N/A# changes, but the only reasonable place to record the aliases is
0N/A# here in kernel land.
0N/A#
0N/A$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
0N/A -$(INS.dir.root.sys)
0N/A
0N/A#
0N/A# create directories in /usr/platform/ for the implementations that are
0N/A# defined in $(IMPLEMENTED_PLATFORM)
0N/A# (eg. SUNW,Ultra-1)
0N/A#
0N/A# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
0N/A# that are linked to it.
0N/A#
0N/A$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
0N/A -$(INS.dir.root.sys)
0N/A
0N/A#
0N/A# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
0N/A# to it's corresponding $(IMPLEMENTED_PLATFORM).
0N/A#
112N/APLATFORMS = $(LINKED_PLATFORMS)
0N/A
0N/A$(USR_PLAT_DIRS): $(USR_PLAT_DIR)
0N/A $(INS.slink3)
0N/A
0N/APLATFORMS += $(IMPLEMENTED_PLATFORM)
0N/A
0N/A#
0N/A# Make the /platforms directories. This is hardwired here because
0N/A# the first stage of the project (KBI) only implements the userland
0N/A# changes, but the only reasonable place to record the aliases is
0N/A# here in kernel land.
0N/A#
0N/Ainstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
0N/A $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
0N/A $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
0N/A $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR)
0N/A
0N/A#
0N/A# rules for making include, sbin, lib dirs/links in
0N/A# /usr/platform/$(PLATFORM)/ for desktop platforms
112N/A#
0N/A$(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
0N/A $(INS.slink4)
0N/A
4134N/A$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
4134N/A $(INS.slink5)
4134N/A
0N/A$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
0N/A -$(INS.dir.root.bin)
0N/A
0N/A#
2086N/A# Full kernel lint target.
4914N/A#
4914N/ALINT_TARGET = globallint
4914N/A
4914N/Agloballint:
4914N/A @-$(ECHO) "\nSUN4U KERNEL: global crosschecks:"
4914N/A @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
0N/A
0N/Alint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
0N/A $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) $(CPU_KMODS)
0N/A
0N/A# EXPORT DELETE START
0N/A
112N/AEXPORT_SRC:
112N/A $(RM) Makefile+
1924N/A sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
1924N/A < Makefile > Makefile+
0N/A $(MV) Makefile+ Makefile
0N/A $(CHMOD) 444 Makefile
868N/A
868N/A# EXPORT DELETE END
1400N/A
868N/Ainclude ../Makefile.targ
868N/A
0N/A#
0N/A# Cross-reference customization: build a cross-reference over all of the
868N/A# sun4u-related directories.
868N/A#
0N/ASHARED_XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
2086N/ACLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
2086N/AXRDIRS = $(SHARED_XRDIRS)
536N/A$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
955N/A
0N/AXRPRUNE = i86pc
0N/A
0N/Acscope.out tags: FRC
0N/A $(XREF) -x $@
0N/A