Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# CDDL HEADER START
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# The contents of this file are subject to the terms of the
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Common Development and Distribution License, Version 1.0 only
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# (the "License"). You may not use this file except in compliance
841179549b6433e782c164a562eb3422f603533dAndreas Gustafsson# with the License.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcc9f7f86c2fa2ceb8a5c16dc934fea7fa6887f2Andreas Gustafsson# or http://www.opensolaris.org/os/licensing.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# See the License for the specific language governing permissions
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# and limitations under the License.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# When distributing Covered Code, include this CDDL HEADER in each
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# If applicable, add the following below this CDDL HEADER, with the
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# fields enclosed by brackets "[]" replaced with your own identifying
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# information: Portions Copyright [yyyy] [name of copyright owner]
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# CDDL HEADER END
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Use is subject to license terms.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# ident "%Z%%M% %I% %E% SMI"
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# This makefile drives the production of all implementation architecture
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# dependent modules for the sun4u architecture.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# The following are SPARC specific (rather than sun4u) specific modules
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# which are required for the sun4u kernel to completely lint. They are
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# not involved in the build in any other way. In order to minimize
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# build time, it is assumed that they are up to date. But since sun4u
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# is really a separate architecture we cannot use the v7 sparc modules.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE START
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# They need to be listed separately since they duplicate global symbols
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# should not be listed in the lint target.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE END
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Override for CPU_KMODS... they cannot be built
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# in parallel
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucedef all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinstall: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @if [ -f $@/Makefile ]; then \
2aca7f657de7002f8144a322148fa42c0a0c1eddAndreas Gustafssoninstall_h check: install_platforms $(IMPLEMENTATIONS) FRC
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Rules for the /platforms directories. This is hardwired here because
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# the first stage of the project (KBI) only implements the userland
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# changes, but the only reasonable place to record the aliases is
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# here in kernel land.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# create directories in /usr/platform/ for the implementations that are
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# defined in $(IMPLEMENTED_PLATFORM)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# (eg. SUNW,Ultra-1)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# that are linked to it.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# to it's corresponding $(IMPLEMENTED_PLATFORM).
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Make the /platforms directories. This is hardwired here because
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# the first stage of the project (KBI) only implements the userland
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# changes, but the only reasonable place to record the aliases is
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# here in kernel land.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# rules for making include, sbin, lib dirs/links in
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# /usr/platform/$(PLATFORM)/ for desktop platforms
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# Full kernel lint target.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafssonlint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# EXPORT DELETE START
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# EXPORT DELETE END
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# Cross-reference customization: build a cross-reference over all of the
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# sun4u-related directories.
f37eb9482057adf62de35e634bfd574e59676950Andreas GustafssonXRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common