Makefile.uts revision 42b06999e871839e006e59d55b2c23c580e83d20
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# CDDL HEADER START
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# The contents of this file are subject to the terms of the
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Common Development and Distribution License (the "License").
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# You may not use this file except in compliance with the License.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# or http://www.opensolaris.org/os/licensing.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# See the License for the specific language governing permissions
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# and limitations under the License.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# When distributing Covered Code, include this CDDL HEADER in each
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# If applicable, add the following below this CDDL HEADER, with the
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# fields enclosed by brackets "[]" replaced with your own identifying
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# information: Portions Copyright [yyyy] [name of copyright owner]
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# CDDL HEADER END
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Use is subject to license terms.
a395dd575518d9e5280fc5d5d5ef47c61b174647ludovicp#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# ident "%Z%%M% %I% %E% SMI"
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# This Makefile contains the common targets and definitions for
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# all kernels. It is to be included in the Makefiles for specific
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# implementation architectures and processor architecture dependent
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# modules: i.e.: all driving kernel Makefiles.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Include global definitions:
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftinclude $(SRC)/Makefile.master
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# No text domain in the kernel.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftDTEXTDOM =
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Keep references to $(SRC)/common relative.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCOMMONBASE= $(UTSBASE)/../common
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Setup build-specific vars
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# To add a build type:
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# add name to ALL_BUILDS32 & ALL_BUILDS64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# set CLASS_name and OBJ_DIR_name
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# add targets to Makefile.targ
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# DEF_BUILDS is for def, lint and install
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# ALL_BUILDS is for everything else (all, clean, ...)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# The NOT_RELEASE_BUILD noise is to maintain compatibility with the
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# gatekeeper's nightly build script.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftDEF_BUILDS32 = obj32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftDEF_BUILDS64 = obj64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftDEF_BUILDSONLY64 = obj64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(NOT_RELEASE_BUILD)DEF_BUILDS32 = debug32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(NOT_RELEASE_BUILD)DEF_BUILDS64 = debug64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(NOT_RELEASE_BUILD)DEF_BUILDSONLY64 = debug64
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftALL_BUILDS32 = obj32 debug32
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftALL_BUILDS64 = obj64 debug64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftALL_BUILDSONLY64 = obj64 debug64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# For modules in 64b dirs that aren't built 64b
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift# or modules in 64b dirs that aren't built 32b we
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift# need to create empty modlintlib files so global lint works
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift#
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftLINT32_BUILDS = debug32
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftLINT64_BUILDS = debug64
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Build class (32b or 64b)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLASS_OBJ32 = 32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLASS_DBG32 = 32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLASS_OBJ64 = 64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLASS_DBG64 = 64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLASS = $(CLASS_$(BUILD_TYPE))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Build subdirectory
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftOBJS_DIR_OBJ32 = obj32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftOBJS_DIR_DBG32 = debug32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftOBJS_DIR_OBJ64 = obj64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftOBJS_DIR_DBG64 = debug64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftOBJS_DIR = $(OBJS_DIR_$(BUILD_TYPE))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Create defaults so empty rules don't
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# confuse make
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLASS_ = 32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftOBJS_DIR_ = debug32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Build tools
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCC_sparc_32 = $(sparc_CC)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCC_sparc_64 = $(sparcv9_CC)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCC_i386_32 = $(i386_CC)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCC_i386_64 = $(amd64_CC)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCC_amd64_64 = $(amd64_CC)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCC = $(CC_$(MACH)_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS_sparc_32 = $(sparc_AS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS_sparc_64 = $(sparcv9_AS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS_i386_32 = $(i386_AS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS_i386_64 = $(amd64_AS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS_amd64_64 = $(amd64_AS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS = $(AS_$(MACH)_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLD_sparc_32 = $(sparc_LD)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLD_sparc_64 = $(sparcv9_LD)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLD_i386_32 = $(i386_LD)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLD_i386_64 = $(amd64_LD)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLD_amd64_64 = $(amd64_LD)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLD = $(LD_$(MACH)_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT_sparc_32 = $(sparc_LINT)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT_sparc_64 = $(sparcv9_LINT)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT_i386_32 = $(i386_LINT)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT_i386_64 = $(amd64_LINT)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT_amd64_64 = $(amd64_LINT)
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftLINT = $(LINT_$(MACH)_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftMODEL_32 = ilp32
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftMODEL_64 = lp64
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftMODEL = $(MODEL_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift#
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift# Build rules for linting the kernel.
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift#
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftLHEAD = ( $(ECHO) "\n$@";
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLGREP.2 = egrep -v ' (_init|_fini|_info|_depends_on) '
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLTAIL = )
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT.c = $(LINT) -c -dirout=$(LINTS_DIR) $(LINTFLAGS) $(LINT_DEFS) $(CPPFLAGS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 =
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_BAD_PTR_CAST_ALIGN
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_SUSPICIOUS_COMPARISON
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_INVALID_ANNOTATION_NAME
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_OLD_STYLE_DECL_OR_BAD_TYPE
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_NO_EXPLICIT_TYPE_GIVEN
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_STATIC_UNUSED
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_PTRDIFF_OVERFLOW
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_32 += -erroff=E_ASSIGN_NARROW_CONV
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_64 = $(LINTTAGS_32)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Selectively disable certain noisy lint errors
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLENIENT_LINTTAGS =
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLENIENT_LINTTAGS += -erroff=E_CONST_TRUNCATED_BY_ASSIGN
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# comment out next line to turn on pedantic 64-bit error checking
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_64 += $(LENIENT_LINTTAGS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTFLAGS_sparc_32 = $(LINTCCMODE) -nsxmuF -errtags=yes
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTFLAGS_sparc_64 = $(LINTFLAGS_sparc_32) -Xarch=v9
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTFLAGS_i386_32 = $(LINTCCMODE) -nsxmuF -errtags=yes
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTFLAGS_i386_64 = $(LINTFLAGS_i386_32) -Xarch=amd64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_sparc_32 = $(LINTTAGS_32)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_sparc_64 = $(LINTTAGS_64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_i386_32 = $(LINTTAGS_32)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTTAGS_i386_64 = $(LINTTAGS_64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINTFLAGS = $(LINTFLAGS_$(MACH)_$(CLASS)) $(LINTTAGS_$(MACH)_$(CLASS))
118d5e72b30150023b9715aed34d3e37be2f905fjvergaraLINTFLAGS += $(C99LMODE)
118d5e72b30150023b9715aed34d3e37be2f905fjvergara
118d5e72b30150023b9715aed34d3e37be2f905fjvergara#
118d5e72b30150023b9715aed34d3e37be2f905fjvergara# Override this variable to modify the name of the lint target.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT_MODULE= $(MODULE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Build the compile/assemble lines:
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftEXTRA_OPTIONS =
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS_DEFS = -D_ASM -D__STDC__=0
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftALWAYS_DEFS_32 = -D_KERNEL -D_SYSCALL32
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftALWAYS_DEFS_64 = -D_KERNEL -D_SYSCALL32 -D_SYSCALL32_IMPL -D_ELF64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# XX64 This should be defined by the compiler!
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftALWAYS_DEFS_64 += -Dsun -D__sun -D__SVR4
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftALWAYS_DEFS = $(ALWAYS_DEFS_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# CPPFLAGS is deliberatly set with a "=" and not a "+=". For the kernel
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# the header include path should not look for header files outside of
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# the kernel code. This "=" removes the search path built in
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Makefile.master inside CPPFLAGS. Ditto for AS_CPPFLAGS.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCPPFLAGS = $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS) \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $(INCLUDE_PATH) $(EXTRA_OPTIONS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftASFLAGS += -P
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftAS_CPPFLAGS = $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS) $(AS_DEFS) \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $(AS_INC_PATH) $(EXTRA_OPTIONS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
97aa123334308cd0615a51c3867f805aeb9e7fb8lutoff#
97aa123334308cd0615a51c3867f805aeb9e7fb8lutoff# Make it (relatively) easy to share compilation options between
97aa123334308cd0615a51c3867f805aeb9e7fb8lutoff# all kernel implementations.
97aa123334308cd0615a51c3867f805aeb9e7fb8lutoff#
97aa123334308cd0615a51c3867f805aeb9e7fb8lutoff
97aa123334308cd0615a51c3867f805aeb9e7fb8lutoff#
97aa123334308cd0615a51c3867f805aeb9e7fb8lutoff# XX64 Compiling with -xc99=%all on build 55 merge makes the
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# kmem_alloc double map parts of the kernel data causing
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# horrible overwriting and forces a hardware reset in
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# segkp_create(). Until the origin of this problem can
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# be tracked down (i.e. is it a deliberate C89 -> C99 semantic
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# change for which the kernel needs repair, or is it just a
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# bug in the x86 compiler?) disabling C99 for kernel compilation
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# when using the Devpro compiler
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swifti386_C99MODE = $(C99_DISABLE)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift$(__GNUC)i386_C99MODE = $(C99_ENABLE)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftsparc_C99MODE = $(C99_DISABLE)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftC99MODE = $($(MACH)_C99MODE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts =
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(STAND_FLAGS_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(CCVERBOSE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(ILDOFF)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(XAOPT)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(CTF_FLAGS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(CERRWARN)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(C99MODE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFLAGS_uts += $(EXTRA_CFLAGS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Declare that $(OBJECTS) and $(LINTS) can be compiled in parallel.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# The DUMMY target is for those instances where OBJECTS and LINTS
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# are empty (to avoid an unconditional .PARALLEL).
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift.PARALLEL: $(OBJECTS) $(LINTS) DUMMY
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Expanded dependencies
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftDEF_DEPS = $(DEF_BUILDS:%=def.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftALL_DEPS = $(ALL_BUILDS:%=all.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLEAN_DEPS = $(ALL_BUILDS:%=clean.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLOBBER_DEPS = $(ALL_BUILDS:%=clobber.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftLINT_DEPS = $(DEF_BUILDS:%=lint.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftMODLINTLIB_DEPS = $(DEF_BUILDS:%=modlintlib.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLEAN_LINT_DEPS = $(ALL_BUILDS:%=clean.lint.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftINSTALL_DEPS = $(DEF_BUILDS:%=install.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftSYM_DEPS = $(SYM_BUILDS:%=symcheck.%)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Default module name
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftBINARY = $(OBJS_DIR)/$(MODULE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Default cleanup definitions
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLEANLINTFILES = $(LINTS) $(MOD_LINT_LIB)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLEANFILES = $(OBJECTS) $(CLEANLINTFILES)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCLOBBERFILES = $(BINARY) $(CLEANFILES)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift# Installation constants:
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# FILEMODE is the mode given to the kernel modules
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# CFILEMODE is the mode given to the '.conf' files
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftFILEMODE = 755
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftDIRMODE = 755
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftOWNER = root
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftGROUP = sys
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCFILEMODE = 644
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Special Installation Macros for the installation of '.conf' files.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# These are unique because they are not installed from the current
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# working directory.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Sigh. Apparently at some time in the past there was a confusion on
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# whether the name is SRC_CONFFILE or SRC_CONFILE. Consistency with the
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# other names would indicate SRC_CONFFILE, but the voting is >180 Makefiles
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# with SRC_CONFILE and about 11 with SRC_CONFFILE. Software development
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# isn't a popularity contest, though, and so my inclination is to define
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# both names for now and incrementally convert to SRC_CONFFILE to be consistent
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# with the other names.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCONFFILE = $(MODULE).conf
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftSRC_CONFFILE = $(CONF_SRCDIR)/$(CONFFILE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftSRC_CONFILE = $(SRC_CONFFILE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_CONFFILE_32 = $(ROOTMODULE).conf
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_CONFFILE_64 = $(ROOTMODULE:%/$(SUBDIR64)/$(MODULE)=%/$(MODULE)).conf
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_CONFFILE = $(ROOT_CONFFILE_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftINS.conffile= \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $(RM) $@; $(INS) -s -m $(CFILEMODE) -f $(@D) $(SRC_CONFFILE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(CH)INS.conffile= \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $(INS) -s -m $(CFILEMODE) -u $(OWNER) -g $(GROUP) -f $(@D) $(SRC_CONFFILE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# The CTF merge of child kernel modules is performed against one of the genunix
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# modules. For Intel builds, all modules will be used with a single genunix:
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# the one built in intel/genunix. For SPARC builds, a given
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# module may be
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# used with one of a number of genunix files, depending on what platform the
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# module is deployed on. We merge against the sun4u genunix to optimize for
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# the common case. We also merge against the ip driver since networking is
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# typically loaded and types defined therein are shared between many modules.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCTFMERGE_GUDIR_sparc = sun4u
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCTFMERGE_GUDIR_i386 = intel
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCTFMERGE_GUDIR = $(CTFMERGE_GUDIR_$(MACH))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCTFMERGE_GENUNIX = \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $(UTSBASE)/$(CTFMERGE_GUDIR)/genunix/$(OBJS_DIR)/genunix
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Used to uniquify a non-genunix module against genunix. If used in patch
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# mode (PATCH_BUILD != "#"), the patch ID corresponding to the module being
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# built will be used as the label. If no ID is available, or if patch mode
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# is not being used, the value of $VERSION will be used.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCTFMERGE_UNIQUIFY_AGAINST_GENUNIX = \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift @label="-L VERSION" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift if [ -z "$(PATCH_BUILD)" ] ; then \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift uniq="-D BASE" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift set -- `$(CTFFINDMOD) -n -r -t $(PMTMO_FILE) $@` ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift if [ "X$$1" != "X-" ] ; then \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift label="-l $$1" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift if [ "$$2" != "fcs" ] ; then \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift uniq="-D $$2" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift fi ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift fi ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift fi ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift mergecmd="$(CTFMERGE) $(CTFMRGFLAGS)" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift cmd="$$mergecmd $$label -d $(CTFMERGE_GENUNIX) $$uniq -o $@" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift echo $$cmd "$(OBJECTS) $(CTFEXTRAOBJS)" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $$cmd $(OBJECTS) $(CTFEXTRAOBJS)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Used to merge the genunix module. genunix has special requirements in
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# patch mode. In particular, it needs to be able to find the genunix used
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift# in the previous version of the KU patch (or the FCS version of genunix in
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift# the case of KU 1).
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCTFMERGE_GENUNIX_MERGE = \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift @if [ -z "$(PATCH_BUILD)" ] ; then \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift set -- `$(CTFFINDMOD) -b $(OBJS_DIR) -o patch,lastgu -n -r \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift -t $(PMTMO_FILE) $(GENUNIX) || true` '' ; \
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift msg= ; \
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift if [ $$$(POUND_SIGN) -eq 1 ] ; \
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift then msg="Error in $(CTFFINDMOD)" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift elif [ "X$$1" = "X-" ] ; then msg="Did not get label" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift elif [ "X$$2" = "X-" ] ; then msg="Did not get withfile" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift fi ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift if [ -n "$$msg" ] ; then \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift echo "make ctf: $$msg - removing $(GENUNIX)" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $(RM) $(GENUNIX) ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift exit 1 ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift fi ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift label="-l $$1" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift with="-w $$2" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift else \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift label="-L VERSION" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift fi ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift cmd="$(CTFMERGE) $(CTFMRGFLAGS) $$label $$with -o $@" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift echo $$cmd "$(OBJECTS) $(CTFEXTRAOBJS) $(IPCTF_TARGET)"; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $$cmd $(OBJECTS) $(CTFEXTRAOBJS) $(IPCTF_TARGET)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Used to copy CTF data from the sun4u genunix to the sun4m genunix. While
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# we may lose some genunix-specific sun4m-only data, there really isn't any
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# other way, since individual ctfmerges on the sun4u and sun4m genunix
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# modules will result in differing type indices for the same types, and we
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# can't uniquify a given non-genunix module against two genunix modules.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCTFMERGE_COPY_CTF_DATA = \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift @if [ -f $(CTFMERGE_GENUNIX) ] ; then \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift cmd="$(CTFMERGE) $(CTFMRGFLAGS) -c $(CTFMERGE_GENUNIX) $@" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift echo $$cmd ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $$cmd ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift else \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift echo "WARNING: $(CTFMERGE_GENUNIX) not built. " \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift "CTF data will be incomplete" ; \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift fi
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# We ctfmerge the ip objects into genunix to maximize the number of common types
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# found there, thus maximizing the effectiveness of uniquification. We don't
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# want the genunix build to have to know about the individual ip objects, so we
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# put them in an archive. The genunix ctfmerge then includes this archive.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftIPCTF = $(IPDRV_DIR)/$(OBJS_DIR)/ipctf.a
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Rule for building fake shared libraries used for symbol resolution
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# when building other modules. -znoreloc is needed here to avoid
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# tripping over code that isn't really suitable for shared libraries.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftBUILD.SO = \
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift $(LD) -o $@ $(GSHARED) $(ZNORELOC) -h $(SONAME)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# SONAME defaults for common fake shared libraries.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(LIBGEN) := SONAME = $(MODULE)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(PLATLIB) := SONAME = misc/platmod
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(CPULIB) := SONAME = 'cpu/$$CPU'
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift$(DTRACESTUBS) := SONAME = dtracestubs
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Installation directories
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# For now, 64b modules install into a subdirectory
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# of their 32b brethren.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftSUBDIR64_sparc = sparcv9
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftSUBDIR64_i386 = amd64
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftSUBDIR64 = $(SUBDIR64_$(MACH))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_MOD_DIR = $(ROOT)/kernel
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_KERN_DIR_32 = $(ROOT_MOD_DIR)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftROOT_DRV_DIR_32 = $(ROOT_MOD_DIR)/drv
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_DTRACE_DIR_32 = $(ROOT_MOD_DIR)/dtrace
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftROOT_EXEC_DIR_32 = $(ROOT_MOD_DIR)/exec
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_FS_DIR_32 = $(ROOT_MOD_DIR)/fs
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_SCHED_DIR_32 = $(ROOT_MOD_DIR)/sched
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_STRMOD_DIR_32 = $(ROOT_MOD_DIR)/strmod
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_IPP_DIR_32 = $(ROOT_MOD_DIR)/ipp
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_SYS_DIR_32 = $(ROOT_MOD_DIR)/sys
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_MISC_DIR_32 = $(ROOT_MOD_DIR)/misc
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_KGSS_DIR_32 = $(ROOT_MOD_DIR)/misc/kgss
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_NLMISC_DIR_32 = $(ROOT_MOD_DIR)/misc
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_MACH_DIR_32 = $(ROOT_MOD_DIR)/mach
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_CPU_DIR_32 = $(ROOT_MOD_DIR)/cpu
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_TOD_DIR_32 = $(ROOT_MOD_DIR)/tod
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_FONT_DIR_32 = $(ROOT_MOD_DIR)/fonts
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_DACF_DIR_32 = $(ROOT_MOD_DIR)/dacf
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_CRYPTO_DIR_32 = $(ROOT_MOD_DIR)/crypto
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_KERN_DIR_64 = $(ROOT_MOD_DIR)/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_DRV_DIR_64 = $(ROOT_MOD_DIR)/drv/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_DTRACE_DIR_64 = $(ROOT_MOD_DIR)/dtrace/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_EXEC_DIR_64 = $(ROOT_MOD_DIR)/exec/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_FS_DIR_64 = $(ROOT_MOD_DIR)/fs/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_SCHED_DIR_64 = $(ROOT_MOD_DIR)/sched/$(SUBDIR64)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftROOT_STRMOD_DIR_64 = $(ROOT_MOD_DIR)/strmod/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_IPP_DIR_64 = $(ROOT_MOD_DIR)/ipp/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_SYS_DIR_64 = $(ROOT_MOD_DIR)/sys/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_MISC_DIR_64 = $(ROOT_MOD_DIR)/misc/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_KGSS_DIR_64 = $(ROOT_MOD_DIR)/misc/kgss/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_NLMISC_DIR_64 = $(ROOT_MOD_DIR)/misc/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_MACH_DIR_64 = $(ROOT_MOD_DIR)/mach/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_CPU_DIR_64 = $(ROOT_MOD_DIR)/cpu/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_TOD_DIR_64 = $(ROOT_MOD_DIR)/tod/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_FONT_DIR_64 = $(ROOT_MOD_DIR)/fonts/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_DACF_DIR_64 = $(ROOT_MOD_DIR)/dacf/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_CRYPTO_DIR_64 = $(ROOT_MOD_DIR)/crypto/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftROOT_KERN_DIR = $(ROOT_KERN_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_DRV_DIR = $(ROOT_DRV_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_DTRACE_DIR = $(ROOT_DTRACE_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_EXEC_DIR = $(ROOT_EXEC_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_FS_DIR = $(ROOT_FS_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftROOT_SCHED_DIR = $(ROOT_SCHED_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_STRMOD_DIR = $(ROOT_STRMOD_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_IPP_DIR = $(ROOT_IPP_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_SYS_DIR = $(ROOT_SYS_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MISC_DIR = $(ROOT_MISC_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_KGSS_DIR = $(ROOT_KGSS_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_NLMISC_DIR = $(ROOT_NLMISC_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MACH_DIR = $(ROOT_MACH_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_CPU_DIR = $(ROOT_CPU_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_TOD_DIR = $(ROOT_TOD_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_FONT_DIR = $(ROOT_FONT_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_DACF_DIR = $(ROOT_DACF_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_CRYPTO_DIR = $(ROOT_CRYPTO_DIR_$(CLASS))
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swift
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MOD_DIRS_32 = $(ROOT_DRV_DIR_32) $(ROOT_EXEC_DIR_32)
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_DTRACE_DIR_32)
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_FS_DIR_32) $(ROOT_SCHED_DIR_32)
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_STRMOD_DIR_32) $(ROOT_SYS_DIR_32)
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_IPP_DIR_32)
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_MISC_DIR_32) $(ROOT_MACH_DIR_32)
e3c8ad70bcd2de5df854e4bedc041b552bcdba31matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_KGSS_DIR_32)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_CPU_DIR_32) $(ROOT_FONT_DIR_32)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_TOD_DIR_32) $(ROOT_DACF_DIR_32)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftROOT_MOD_DIRS_32 += $(ROOT_CRYPTO_DIR_32)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_MOD_DIR = $(ROOT)/usr/kernel
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_DRV_DIR_32 = $(USR_MOD_DIR)/drv
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_EXEC_DIR_32 = $(USR_MOD_DIR)/exec
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_FS_DIR_32 = $(USR_MOD_DIR)/fs
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_SCHED_DIR_32 = $(USR_MOD_DIR)/sched
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_STRMOD_DIR_32 = $(USR_MOD_DIR)/strmod
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_SYS_DIR_32 = $(USR_MOD_DIR)/sys
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_MISC_DIR_32 = $(USR_MOD_DIR)/misc
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_DACF_DIR_32 = $(USR_MOD_DIR)/dacf
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_PCBE_DIR_32 = $(USR_MOD_DIR)/pcbe
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_DRV_DIR_64 = $(USR_MOD_DIR)/drv/$(SUBDIR64)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_EXEC_DIR_64 = $(USR_MOD_DIR)/exec/$(SUBDIR64)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_FS_DIR_64 = $(USR_MOD_DIR)/fs/$(SUBDIR64)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_SCHED_DIR_64 = $(USR_MOD_DIR)/sched/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_STRMOD_DIR_64 = $(USR_MOD_DIR)/strmod/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_SYS_DIR_64 = $(USR_MOD_DIR)/sys/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_MISC_DIR_64 = $(USR_MOD_DIR)/misc/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_DACF_DIR_64 = $(USR_MOD_DIR)/dacf/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_PCBE_DIR_64 = $(USR_MOD_DIR)/pcbe/$(SUBDIR64)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_DRV_DIR = $(USR_DRV_DIR_$(CLASS))
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_EXEC_DIR = $(USR_EXEC_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_FS_DIR = $(USR_FS_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_SCHED_DIR = $(USR_SCHED_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_STRMOD_DIR = $(USR_STRMOD_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_SYS_DIR = $(USR_SYS_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_MISC_DIR = $(USR_MISC_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_DACF_DIR = $(USR_DACF_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_PCBE_DIR = $(USR_PCBE_DIR_$(CLASS))
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_MOD_DIRS_32 = $(USR_DRV_DIR_32) $(USR_EXEC_DIR_32)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_MOD_DIRS_32 += $(USR_FS_DIR_32) $(USR_SCHED_DIR_32)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_MOD_DIRS_32 += $(USR_STRMOD_DIR_32) $(USR_SYS_DIR_32)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftUSR_MOD_DIRS_32 += $(USR_MISC_DIR_32) $(USR_DACF_DIR_32)
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swiftUSR_MOD_DIRS_32 += $(USR_PCBE_DIR_32)
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftinclude $(SRC)/Makefile.psm
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift# Set ownership on links.
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift#
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCHOWNLINK=
cb335d7bbe7fc55b040b87ae27ef6296c20f22e0matthew_swift$(CH)CHOWNLINK= ; $(CHOWN) $(OWNER) $@
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swiftCHGRPLINK=
314d32b61c4402ffe0a25bf8ae6a0e56e6d7964bmatthew_swift$(CH)CHGRPLINK= ; $(CHGRP) $(GROUP) $@
#
# The "-r" on the remove may be considered temporary, but is required
# while the replacement of the SUNW,SPARCstation-10,SX directory by
# a symbolic link is being propagated.
#
INS.slink1= $(RM) -r $@; $(SYMLINK) $(PLATFORM) $@ $(CHOWNLINK) $(CHGRPLINK)
INS.slink2= $(RM) -r $@; $(SYMLINK) ../$(PLATFORM)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
INS.slink3= $(RM) -r $@; $(SYMLINK) $(IMPLEMENTED_PLATFORM) $@ $(CHOWNLINK) $(CHGRPLINK)
INS.slink4= $(RM) -r $@; $(SYMLINK) ../$(PLATFORM)/include $@ $(CHOWNLINK) $(CHGRPLINK)
INS.slink5= $(RM) -r $@; $(SYMLINK) ../$(PLATFORM)/sbin $@ $(CHOWNLINK) $(CHGRPLINK)
INS.slink6= $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/$(MODULE) $@ $(CHOWNLINK) $(CHGRPLINK)
ROOT_PLAT_LINKS = $(PLAT_LINKS:%=$(ROOT_PLAT_DIR)/%)
ROOT_PLAT_LINKS_2 = $(PLAT_LINKS_2:%=$(ROOT_PLAT_DIR)/%)
USR_PLAT_LINKS = $(PLAT_LINKS:%=$(USR_PLAT_DIR)/%)
USR_PLAT_LINKS_2 = $(PLAT_LINKS_2:%=$(USR_PLAT_DIR)/%)
#
# Collection of all relevant, delivered kernel modules.
#
KMODS = $(DRV_KMODS) $(EXEC_KMODS) $(FS_KMODS) $(SCHED_KMODS) $(TOD_KMODS) \
$(STRMOD_KMODS) $(SYS_KMODS) $(MISC_KMODS) $(NLMISC_KMODS) \
$(MACH_KMODS) $(CPU_KMODS) $(GENUNIX_KMODS) \
$(GSS_KMODS) $(MMU_KMODS) $(DACF_KMODS) $(EXPORT_KMODS) \
$(IPP_KMODS) $(CRYPTO_KMODS) $(CRYPTO_EK_KMODS) $(PCBE_KMODS) \
$(DRV_KMODS_$(CLASS)) $(MISC_KMODS_$(CLASS))
LINT_KMODS = $(DRV_KMODS) $(EXEC_KMODS) $(FS_KMODS) $(SCHED_KMODS) \
$(TOD_KMODS) $(STRMOD_KMODS) $(SYS_KMODS) $(MISC_KMODS) \
$(MACH_KMODS) $(GSS_KMODS) $(DACF_KMODS) $(IPP_KMODS) \
$(CRYPTO_KMODS) $(PCBE_KMODS) \
$(DRV_KMODS_$(CLASS)) $(MISC_KMODS_$(CLASS))
THIS_YEAR:sh= /bin/date +%Y
$(OBJS_DIR)/logsubr.o := CPPFLAGS += -DTHIS_YEAR=$(THIS_YEAR)
$(OBJS_DIR)/logsubr.ln := CPPFLAGS += -DTHIS_YEAR=$(THIS_YEAR)
#
# Files to be compiled with -xa, to generate basic block execution
# count data.
#
# There are several ways to compile parts of the kernel for kcov:
# 1) Add targets to BB_FILES here or in other Makefiles
# (they must in the form of $(OBJS_DIR)/target.o)
# 2) setenv BB_FILES '$(XXX_OBJS:%=$(OBJS_DIR)/%)'
# 3) setenv BB_FILES '$(OBJECTS)'
#
# Do NOT setenv CFLAGS -xa, as that will cause infinite recursion
# in unix_bb.o
#
BB_FILES =
$(BB_FILES) := XAOPT = -xa
#
# The idea here is for unix_bb.o to be in all kernels except the
# kernel which actually gets shipped to customers. In practice,
# $(RELEASE_BUILD) is on for a number of the late beta and fcs builds.
#
CODE_COVERAGE=
$(RELEASE_BUILD)CODE_COVERAGE:sh= echo \\043
$(CODE_COVERAGE)$(OBJS_DIR)/unix_bb.o := CPPFLAGS += -DKCOV
$(CODE_COVERAGE)$(OBJS_DIR)/unix_bb.ln := CPPFLAGS += -DKCOV
#
# Do not let unix_bb.o get compiled with -xa!
#
$(OBJS_DIR)/unix_bb.o := XAOPT =
#
# MPSAS support
#
MPSAS_BUILD:sh= echo \\043
#
# Privilege files
#
PRIVS_AWK = $(SRC)/uts/common/os/privs.awk
PRIVS_DEF = $(SRC)/uts/common/os/priv_defs