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