Makefile revision 986fd29a0dc13f7608ef7f508f6e700bd7bc2720
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# CDDL HEADER START
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# The contents of this file are subject to the terms of the
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Common Development and Distribution License (the "License").
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# You may not use this file except in compliance with the License.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# See the License for the specific language governing permissions
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# and limitations under the License.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# When distributing Covered Code, include this CDDL HEADER in each
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# If applicable, add the following below this CDDL HEADER, with the
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# fields enclosed by brackets "[]" replaced with your own identifying
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# information: Portions Copyright [yyyy] [name of copyright owner]
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# CDDL HEADER END
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Use is subject to license terms.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# ident "%Z%%M% %I% %E% SMI"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# This makefile drives the production of unix (and unix.o).
981e542f40f5acaf95b69c5854e5ffb080204242Lubos Kosco# sun4u implementation architecture dependent
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Path to the base of the uts directory tree (usually /usr/src/uts).
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Define the module and object file sets.
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadLINTS = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadKRTLD_MAPFILE = $(UTSBASE)/sparc/krtld/mapfile
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead#UNIX_GLOM = $(OBJS_DIR)/unix.glom
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadGENOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadCPUOPTS = -L $(CPU_DIR)/$(OBJS_DIR) -l $(CPUNAME)
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadPLATOPTS = -L $(PLAT_DIR)/$(OBJS_DIR) -l $(PLATMOD)
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Include common rules.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Define targets
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadINSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE) $(UNIX32_LINK)
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# This is UNIX_DIR. Use a short path.
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadCLEANFILES += $(UNIX_O) $(MODSTUBS_O) $(KRTLD_O) $(KRTLD_OBJECTS) \
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# lint pass one enforcement
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Turn on doubleword alignment for 64 bit counter timer registers
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# For now, disable these lint checks; maintainers should endeavor
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# to investigate and remove these for maximum lint coverage.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Please do not carry these forward to new Makefiles.
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Default build targets.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead$(UNIX_BIN): $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) \
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead$(UNIX32_LINK): $(ROOT_PSM_KERN_DIR_32) $(UNIX_BIN)
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halsteadsymcheck: $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBS)
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
4d79e2c088c259b7a6c47bc106ca98ecb681923eLubos Kosco $(LD) -r -o $@ -M$(KRTLD_MAPFILE) $(KRTLD_OBJECTS)
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Special rules for generating assym.h for inclusion in assembly files.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# CPU_OBJ now comprises of 2 object files which come from sun4 common
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# and from architecture dependent code. OBJS_DIR is prepended where
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# CPU_OBJ is defined to allow for building multiple CPU_OBJ's
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# The global lint target builds the kernel lint library (llib-lunix.ln)
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# which is equivalent to a lint of /unix.o. Then all kernel modules for
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# this architecture are linted against the kernel lint library.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Note: lint errors in the kernel lint library will be repeated for
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# each module. It is important that the kernel lint library
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# be clean to keep the textual output to a reasonable level.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead @-$(ECHO) "\n$(UNIX): (library construction):"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead# Include common targets.