Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# CDDL HEADER START
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
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.
fcc9f7f86c2fa2ceb8a5c16dc934fea7fa6887f2Andreas Gustafsson#
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#
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]
fcc9f7f86c2fa2ceb8a5c16dc934fea7fa6887f2Andreas Gustafsson#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# CDDL HEADER END
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Use is subject to license terms.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# ident "%Z%%M% %I% %E% SMI"
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# This makefile drives the production of all implementation architecture
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# dependent modules for the sun4u architecture.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceUTSBASE = ..
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinclude Makefile.sun4u
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
fcc9f7f86c2fa2ceb8a5c16dc934fea7fa6887f2Andreas Gustafsson#
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 Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceSPARC_LINTS =
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceLINT_LIBS = $(LINT_LIB) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE START
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
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#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCRYPTO_EK_KMODS += aes256
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCRYPTO_EK_KMODS += arcfour2048
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE END
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucedef := TARGET= def
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceall := TARGET= all
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinstall := TARGET= install
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinstall_h := TARGET= install_h
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceclean := TARGET= clean
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceclobber := TARGET= clobber
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucelint := TARGET= lint
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucelintlib := TARGET= lintlib
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucemodlintlib := TARGET= modlintlib
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceclean.lint := TARGET= clean.lint
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucecheck := TARGET= check
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce.KEEP_STATE:
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce.PARALLEL: $(KMODS) $(XMODS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Override for CPU_KMODS... they cannot be built
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# in parallel
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce.NO_PARALLEL: $(CPU_KMODS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucedef all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(IMPLEMENTATIONS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinstall: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(IMPLEMENTATIONS)
2aca7f657de7002f8144a322148fa42c0a0c1eddAndreas Gustafsson
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucelintlib: unix
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucemodlintlib: $(LINT_KMODS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucegenassym unix $(KMODS) $(IMPLEMENTATIONS): FRC
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @cd $@; pwd; $(MAKE) $(TARGET)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce$(XMODS): FRC
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @if [ -f $@/Makefile ]; then \
2aca7f657de7002f8144a322148fa42c0a0c1eddAndreas Gustafsson cd $@; pwd; $(MAKE) $(TARGET); \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce else \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce true; \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce fi
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
2aca7f657de7002f8144a322148fa42c0a0c1eddAndreas Gustafssoninstall_h check: install_platforms $(IMPLEMENTATIONS) FRC
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @cd sys; pwd; $(MAKE) $(TARGET)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @cd vm; pwd; $(MAKE) $(TARGET)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
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#
2aca7f657de7002f8144a322148fa42c0a0c1eddAndreas Gustafsson$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce -$(INS.dir.root.sys)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
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#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# that are linked to it.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce -$(INS.dir.root.sys)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# to it's corresponding $(IMPLEMENTED_PLATFORM).
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LucePLATFORMS = $(LINKED_PLATFORMS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce$(USR_PLAT_DIRS): $(USR_PLAT_DIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(INS.slink3)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LucePLATFORMS += $(IMPLEMENTED_PLATFORM)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
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 Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson#
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# rules for making include, sbin, lib dirs/links in
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# /usr/platform/$(PLATFORM)/ for desktop platforms
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce$(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson $(INS.slink4)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson $(INS.slink5)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson -$(INS.dir.root.bin)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# Full kernel lint target.
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson#
f37eb9482057adf62de35e634bfd574e59676950Andreas GustafssonLINT_TARGET = globallint
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafssongloballint:
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @-$(ECHO) "\nSUN4U KERNEL: global crosschecks:"
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafssonlint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson $(IMPLEMENTATIONS) $(CPU_KMODS)
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# EXPORT DELETE START
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas GustafssonEXPORT_SRC:
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson $(RM) Makefile+
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson < Makefile > Makefile+
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson $(MV) Makefile+ Makefile
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson $(CHMOD) 444 Makefile
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# EXPORT DELETE END
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafssoninclude ../Makefile.targ
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson#
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# Cross-reference customization: build a cross-reference over all of the
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson# sun4u-related directories.
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson#
f37eb9482057adf62de35e634bfd574e59676950Andreas GustafssonXRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
f37eb9482057adf62de35e634bfd574e59676950Andreas GustafssonXRPRUNE = i86pc
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafssoncscope.out tags: FRC
f37eb9482057adf62de35e634bfd574e59676950Andreas Gustafsson $(XREF) -x $@
eadfcf9cf79376eaae5e3010882ba4f41a7c9b89Andreas Gustafsson