Makefile revision 554ff184129088135ad2643c1c9832174a17be88
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# CDDL HEADER START
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# The contents of this file are subject to the terms of the
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# Common Development and Distribution License, Version 1.0 only
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# (the "License"). You may not use this file except in compliance
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# with the License.
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# or http://www.opensolaris.org/os/licensing.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# See the License for the specific language governing permissions
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# and limitations under the License.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# When distributing Covered Code, include this CDDL HEADER in each
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# If applicable, add the following below this CDDL HEADER, with the
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# CDDL HEADER END
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# Use is subject to license terms.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# ident "%Z%%M% %I% %E% SMI"
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
af62929dce3cc5e14c75438cd2b893f82ae6dbc8vboxsync# This makefile drives the production of all implementation architecture
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# dependent modules for the sun4v architecture.
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsync#
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsyncUTSBASE = ..
341c5004a837c62a8a12ec854b0f75cf7ffc15eavboxsync
341c5004a837c62a8a12ec854b0f75cf7ffc15eavboxsyncinclude Makefile.sun4v
341c5004a837c62a8a12ec854b0f75cf7ffc15eavboxsync
341c5004a837c62a8a12ec854b0f75cf7ffc15eavboxsync#
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsync# The following are SPARC specific (rather than sun4v) specific modules
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# which are required for the sun4v kernel to completely lint. They are
04e845ee9ef813501cd2570a4188cb852d170408vboxsync# not involved in the build in any other way. In order to minimize
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync# build time, it is assumed that they are up to date. But since sun4v
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync# is really a separate architecture we cannot use the v7 sparc modules.
9161d9a8318db73b2848c1feaef3880980474e64vboxsync#
04e845ee9ef813501cd2570a4188cb852d170408vboxsyncSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
04e845ee9ef813501cd2570a4188cb852d170408vboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncSPARC_LINTS =
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncLINT_LIBS = $(LINT_LIB) \
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
22500d40977b2e17949f8598de4f3c6d59ab405avboxsync# EXPORT DELETE START
22500d40977b2e17949f8598de4f3c6d59ab405avboxsync#
22500d40977b2e17949f8598de4f3c6d59ab405avboxsync# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# They need to be listed separately since they duplicate global symbols
22500d40977b2e17949f8598de4f3c6d59ab405avboxsync# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
3933885bc0c2c93436d858a14564c6179ec72872vboxsync# should not be listed in the lint target.
3933885bc0c2c93436d858a14564c6179ec72872vboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncCRYPTO_EK_KMODS += arcfour2048
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# EXPORT DELETE END
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncdef := TARGET= def
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncall := TARGET= all
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncinstall := TARGET= install
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncinstall_h := TARGET= install_h
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclean := TARGET= clean
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclobber := TARGET= clobber
085bc29163eb87e345acaae02789e4c233d51f3bvboxsynclint := TARGET= lint
085bc29163eb87e345acaae02789e4c233d51f3bvboxsynclintlib := TARGET= lintlib
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncmodlintlib := TARGET= modlintlib
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclean.lint := TARGET= clean.lint
085bc29163eb87e345acaae02789e4c233d51f3bvboxsynccheck := TARGET= check
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync.KEEP_STATE:
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync.PARALLEL: $(KMODS) $(XMODS)
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync# Override for CPU_KMODS... they cannot be built
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync# in parallel
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync.NO_PARALLEL: $(CPU_KMODS)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncdef all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) \
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync $(IMPLEMENTATIONS)
04e845ee9ef813501cd2570a4188cb852d170408vboxsync
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsyncinstall: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) \
9161d9a8318db73b2848c1feaef3880980474e64vboxsync $(IMPLEMENTATIONS)
af62929dce3cc5e14c75438cd2b893f82ae6dbc8vboxsync
af62929dce3cc5e14c75438cd2b893f82ae6dbc8vboxsynclintlib: unix
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync
04e845ee9ef813501cd2570a4188cb852d170408vboxsyncmodlintlib: $(LINT_KMODS)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsyncgenassym unix $(KMODS) $(IMPLEMENTATIONS): FRC
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync @cd $@; pwd; $(MAKE) $(TARGET)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync$(XMODS): FRC
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync @if [ -f $@/Makefile ]; then \
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync cd $@; pwd; $(MAKE) $(TARGET); \
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync else \
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync true; \
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync fi
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
00c120c036112e6430a84cb41ddc3e847ba1e9e2vboxsyncinstall_h check: install_platforms $(IMPLEMENTATIONS) FRC
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync @cd sys; pwd; $(MAKE) $(TARGET)
83ee0b9fd6aa227bf4276f9d41af7ef59c03e8eevboxsync @cd vm; pwd; $(MAKE) $(TARGET)
6361862f262bb5f90ed82f2a6e926c35bfa9cf18vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# Rules for the /platforms directories. This is hardwired here because
08de95260e5829c72e66326016c7e2fc861d9f26vboxsync# the first stage of the project (KBI) only implements the userland
e99106e1706f8e87456f34b22c40becae61e1ed0vboxsync# changes, but the only reasonable place to record the aliases is
e99106e1706f8e87456f34b22c40becae61e1ed0vboxsync# here in kernel land.
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync -$(INS.dir.root.sys)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync $(INS.slink1)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# create directories in /usr/platform/ for the implementations that are
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# defined in $(IMPLEMENTED_PLATFORM)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# that are linked to it.
08640b1dc58f26140fca6525ced3dbdef4ce45f7vboxsync#
770da3dbb247278c98d1b21d2e11a0a7769131a4vboxsync$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync -$(INS.dir.root.sys)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# to it's corresponding $(IMPLEMENTED_PLATFORM).
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
83ee0b9fd6aa227bf4276f9d41af7ef59c03e8eevboxsyncPLATFORMS = $(LINKED_PLATFORMS)
6361862f262bb5f90ed82f2a6e926c35bfa9cf18vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync$(USR_PLAT_DIRS): $(USR_PLAT_DIR)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync $(INS.slink3)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsyncPLATFORMS += $(IMPLEMENTED_PLATFORM)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
4bc74a1db929517da626b12e61cc468fa0947927vboxsync# Make the /platforms directories. This is hardwired here because
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# the first stage of the project (KBI) only implements the userland
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# changes, but the only reasonable place to record the aliases is
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync# here in kernel land.
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync#
72bb582308f9b6953c65b8b8807597dbef848b16vboxsyncinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR)
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# rules for making include, sbin, lib dirs/links in
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# /usr/platform/$(PLATFORM)/ for desktop platforms
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync$(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync $(INS.slink4)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync $(INS.slink5)
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync -$(INS.dir.root.bin)
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
374979da4e9440f386798bce28aa9165f3fb5e3avboxsync# Full kernel lint target.
303ea6bb23384a122bac365c48db3dc4971cf9b1vboxsync#
303ea6bb23384a122bac365c48db3dc4971cf9b1vboxsyncLINT_TARGET = globallint
303ea6bb23384a122bac365c48db3dc4971cf9b1vboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncgloballint:
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync @-$(ECHO) "\nSUN4V KERNEL: global crosschecks:"
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsynclint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync $(IMPLEMENTATIONS)
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync# EXPORT DELETE START
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsyncEXPORT_SRC:
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync $(RM) Makefile+
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync < Makefile > Makefile+
346af0930020342df40a1ca8d13eb185ad48067evboxsync $(MV) Makefile+ Makefile
346af0930020342df40a1ca8d13eb185ad48067evboxsync $(CHMOD) 444 Makefile
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsync# EXPORT DELETE END
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsyncinclude ../Makefile.targ
346af0930020342df40a1ca8d13eb185ad48067evboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# Cross-reference customization: build a cross-reference over all of the
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# sun4v-related directories.
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncXRDIRS = ../sun4v ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
0de1998ac52682bb5322df476e45f237265ea9b7vboxsyncXRPRUNE = i86pc
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsynccscope.out tags: FRC
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync $(XREF) -x $@
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync