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