Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
843e19887f64dde75055cf8842fc4db2171eff45johnlev# CDDL HEADER START
843e19887f64dde75055cf8842fc4db2171eff45johnlev# The contents of this file are subject to the terms of the
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Common Development and Distribution License (the "License").
843e19887f64dde75055cf8842fc4db2171eff45johnlev# You may not use this file except in compliance with the License.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
843e19887f64dde75055cf8842fc4db2171eff45johnlev# See the License for the specific language governing permissions
843e19887f64dde75055cf8842fc4db2171eff45johnlev# and limitations under the License.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# When distributing Covered Code, include this CDDL HEADER in each
843e19887f64dde75055cf8842fc4db2171eff45johnlev# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# If applicable, add the following below this CDDL HEADER, with the
843e19887f64dde75055cf8842fc4db2171eff45johnlev# fields enclosed by brackets "[]" replaced with your own identifying
843e19887f64dde75055cf8842fc4db2171eff45johnlev# information: Portions Copyright [yyyy] [name of copyright owner]
843e19887f64dde75055cf8842fc4db2171eff45johnlev# CDDL HEADER END
98157a7002f4f2cf7978f3084ca5577f0a1d72b2akolb# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Use is subject to license terms.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# This makefile drives the production of unix (and unix.o).
843e19887f64dde75055cf8842fc4db2171eff45johnlev# i86xpv implementation architecture dependent
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Path to the base of the uts directory tree (usually /usr/src/uts).
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Define the module and object file sets.
843e19887f64dde75055cf8842fc4db2171eff45johnlevLIBOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
843e19887f64dde75055cf8842fc4db2171eff45johnlevDBOOT_LINTS = $(DBOOT_OBJS:%.o=$(DBOOT_OBJS_DIR)/%.ln)
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Include common rules.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Define targets
843e19887f64dde75055cf8842fc4db2171eff45johnlev# This is UNIX_DIR. Use a short path.
843e19887f64dde75055cf8842fc4db2171eff45johnlevCLEANLINTFILES += $(LINT_LIB) $(DBOOT_LINT_LIB) $(DBOOT_LINTS)
843e19887f64dde75055cf8842fc4db2171eff45johnlev# instr_size needs a special header
843e19887f64dde75055cf8842fc4db2171eff45johnlev$(OBJS_DIR)/instr_size.o := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
843e19887f64dde75055cf8842fc4db2171eff45johnlev$(OBJS_DIR)/instr_size.ln := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
843e19887f64dde75055cf8842fc4db2171eff45johnlev# For now, disable these lint checks; maintainers should endeavor
843e19887f64dde75055cf8842fc4db2171eff45johnlev# to investigate and remove these for maximum lint coverage.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Please do not carry these forward to new Makefiles.
8793b36b40d14ad0a0fecc97738dc118a928f46cNick Todd# Ensure that lint sees 'struct cpu' containing a fully declared
8793b36b40d14ad0a0fecc97738dc118a928f46cNick Todd# embedded 'struct machcpu'
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Default build targets.
843e19887f64dde75055cf8842fc4db2171eff45johnlev$(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE_NAME) \
843e19887f64dde75055cf8842fc4db2171eff45johnlev $(LD) -dy -b -o $@ -e dboot_image -znointerp -M $(MAPFILE_NAME) \
843e19887f64dde75055cf8842fc4db2171eff45johnlev$(DBOOT_BIN): $(DBOOT_OBJS_DIR) $(DBOOT_OBJECTS) dboot/Mapfile.dboot
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Special rules for generating assym.h for inclusion in assembly files.
843e19887f64dde75055cf8842fc4db2171eff45johnlev$(DSF_DIR)/$(OBJS_DIR)/assym.h $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h: FRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev# The global lint target builds the kernel lint library (llib-lunix.ln)
843e19887f64dde75055cf8842fc4db2171eff45johnlev# which is equivalent to a lint of /unix.o. Then all kernel modules for
843e19887f64dde75055cf8842fc4db2171eff45johnlev# this architecture are linted against the kernel lint library.
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Note: lint errors in the kernel lint library will be repeated for
843e19887f64dde75055cf8842fc4db2171eff45johnlev# each module. It is important that the kernel lint library
843e19887f64dde75055cf8842fc4db2171eff45johnlev# be clean to keep the textual output to a reasonable level.
843e19887f64dde75055cf8842fc4db2171eff45johnlev @$(LINT) -o$(DBOOT) $(DBOOT_LINTFLAGS) $(DBOOT_LINTS)
843e19887f64dde75055cf8842fc4db2171eff45johnlev# Include common targets.