Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# CDDL HEADER START
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# The contents of this file are subject to the terms of the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Common Development and Distribution License (the "License").
31ddc75584c5cde53d2e78a737587f2e7fdcb0d2Timo Sirainen# You may not use this file except in compliance with the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# See the License for the specific language governing permissions
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen# and limitations under the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
31ddc75584c5cde53d2e78a737587f2e7fdcb0d2Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
31ddc75584c5cde53d2e78a737587f2e7fdcb0d2Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
e4b09b008ab544eb8994beecbfffefa21d855e43Timo Sirainen# CDDL HEADER END
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Use is subject to license terms.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# ident "%Z%%M% %I% %E% SMI"
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen# This makefile drives the production of /unix (and unix.o).
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen# sun4u implementation architecture dependent
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen# Path to the base of the uts directory tree (usually /usr/src/uts).
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Define the module and object file sets.
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo SirainenLINTS = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenGENOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCPUOPTS = -L $(CPU_DIR)/$(OBJS_DIR) -l $(CPUNAME)
20a802016205bbcafc90f164f769ea801f88d014Timo SirainenPLATOPTS = -L $(PLAT_DIR)/$(OBJS_DIR) -l $(PLATMOD)
bbf796c17f02538058d7559bfe96d677e5b55015Timo Sirainen# Include common rules.
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8Timo Sirainen# Define targets
5a07b37a9df398b5189c14872a600384208ab74bTimo SirainenINSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE) $(UNIX32_LINK)
bbf796c17f02538058d7559bfe96d677e5b55015Timo Sirainen# This is UNIX_DIR. Use a short path.
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8Timo SirainenCLEANFILES += $(UNIX_O) $(MODSTUBS_O) $(OBJS_DIR)/vers.c \
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8Timo Sirainen# lint pass one enforcement
5a07b37a9df398b5189c14872a600384208ab74bTimo Sirainen# Turn on doubleword alignment for 64 bit counter timer registers
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen# For now, disable these lint checks; maintainers should endeavor
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen# to investigate and remove these for maximum lint coverage.
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen# Please do not carry these forward to new Makefiles.
519e0a461271843833a2b42626ad93f6e7ddc497Timo SirainenLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen# Default build targets.
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen$(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) $(DTRACESTUBS)
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen $(LD) -dy -b -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen$(UNIX32_LINK): $(ROOT_PSM_KERN_DIR_32) $(UNIX_BIN)
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen#$(UNIX).glom: $(UNIX)
f23298fea47eecbeded985ee2537a34c4c4ef56bTimo Sirainen# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \
f23298fea47eecbeded985ee2537a34c4c4ef56bTimo Sirainen# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX)
f23298fea47eecbeded985ee2537a34c4c4ef56bTimo Sirainen# $(POST_PROCESS)
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen# Special rules for generating assym.h for inclusion in assembly files.
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8Timo Sirainen# CPU_OBJ now comprises of 2 object files which come from sun4 common
5a07b37a9df398b5189c14872a600384208ab74bTimo Sirainen# and from architecture dependent code. OBJS_DIR is prepended where
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen# CPU_OBJ is defined to allow for building multiple CPU_OBJ's
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8Timo Sirainen# The global lint target builds the kernel lint library (llib-lunix.ln)
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8Timo Sirainen# which is equivalent to a lint of /unix.o. Then all kernel modules for
5a07b37a9df398b5189c14872a600384208ab74bTimo Sirainen# this architecture are linted against the kernel lint library.
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8Timo Sirainen# Note: lint errors in the kernel lint library will be repeated for
5a07b37a9df398b5189c14872a600384208ab74bTimo Sirainen# each module. It is important that the kernel lint library
5a07b37a9df398b5189c14872a600384208ab74bTimo Sirainen# be clean to keep the textual output to a reasonable level.
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen @-$(ECHO) "\n$(UNIX): (library construction):"
bbf796c17f02538058d7559bfe96d677e5b55015Timo Sirainen# Include common targets.