Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
70e5a7403f0e0a3bd292b8287c5fed5772c15270Automatic Updater# CDDL HEADER START
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# The contents of this file are subject to the terms of the
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# Common Development and Distribution License (the "License").
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# You may not use this file except in compliance with the License.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# fields enclosed by brackets "[]" replaced with your own identifying
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# CDDL HEADER END
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark Andrews# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# Use is subject to license terms.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# ident "%Z%%M% %I% %E% SMI"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# This makefile drives the production of /unix (and unix.o).
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# sun4u implementation architecture dependent
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# Path to the base of the uts directory tree (usually /usr/src/uts).
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark Andrews# Define the module and object file sets.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark AndrewsGENOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark AndrewsCPUOPTS = -L $(CPU_DIR)/$(OBJS_DIR) -l $(CPUNAME)
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark AndrewsPLATOPTS = -L $(PLAT_DIR)/$(OBJS_DIR) -l $(PLATMOD)
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark Andrews# Include common rules.
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark Andrews# Define targets
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark AndrewsINSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE) $(UNIX32_LINK)
b9efcf0a377381b29960137e54ecaf4db85a35c8Mark Andrews# This is UNIX_DIR. Use a short path.
a76b380643a22f23a67a9df284e86cd7ef7608c1Mark AndrewsCLEANFILES += $(UNIX_O) $(MODSTUBS_O) $(OBJS_DIR)/vers.c \
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# lint pass one enforcement
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson# Turn on doubleword alignment for 64 bit counter timer registers
233085a7d2b040eda2512f9014bcea58af220aa2Andreas Gustafsson# For now, disable these lint checks; maintainers should endeavor
233085a7d2b040eda2512f9014bcea58af220aa2Andreas Gustafsson# to investigate and remove these for maximum lint coverage.
233085a7d2b040eda2512f9014bcea58af220aa2Andreas Gustafsson# Please do not carry these forward to new Makefiles.
233085a7d2b040eda2512f9014bcea58af220aa2Andreas GustafssonLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
f621719829356f27e831507b75e88e8a655e48d8Danny MayerLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
d0aebc5a55b6145297d94f8aee939852357c59fcMark Andrews# Default build targets.
233085a7d2b040eda2512f9014bcea58af220aa2Andreas Gustafsson$(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) $(DTRACESTUBS)
233085a7d2b040eda2512f9014bcea58af220aa2Andreas Gustafsson $(LD) -dy -b -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \
233085a7d2b040eda2512f9014bcea58af220aa2Andreas Gustafsson $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
531eafa3026663020f4a2ac5587cce44341e3442Andreas Gustafsson$(UNIX32_LINK): $(ROOT_PSM_KERN_DIR_32) $(UNIX_BIN)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#$(UNIX).glom: $(UNIX)
9aba20edee4e704433a464ae43b070b0775de506Mark Andrews# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \
9aba20edee4e704433a464ae43b070b0775de506Mark Andrews# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX)
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# $(POST_PROCESS)
9aba20edee4e704433a464ae43b070b0775de506Mark Andrews# Special rules for generating assym.h for inclusion in assembly files.
9aba20edee4e704433a464ae43b070b0775de506Mark Andrews# CPU_OBJ now comprises of 2 object files which come from sun4 common
9aba20edee4e704433a464ae43b070b0775de506Mark Andrews# and from architecture dependent code. OBJS_DIR is prepended where
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# CPU_OBJ is defined to allow for building multiple CPU_OBJ's
9aba20edee4e704433a464ae43b070b0775de506Mark Andrews# The global lint target builds the kernel lint library (llib-lunix.ln)
ed03e26c44347ec20aff6608de6082e3594d95fbMark Andrews# which is equivalent to a lint of /unix.o. Then all kernel modules for
ed03e26c44347ec20aff6608de6082e3594d95fbMark Andrews# this architecture are linted against the kernel lint library.
ed03e26c44347ec20aff6608de6082e3594d95fbMark Andrews# Note: lint errors in the kernel lint library will be repeated for
ed03e26c44347ec20aff6608de6082e3594d95fbMark Andrews# each module. It is important that the kernel lint library
ed03e26c44347ec20aff6608de6082e3594d95fbMark Andrews# be clean to keep the textual output to a reasonable level.
ed03e26c44347ec20aff6608de6082e3594d95fbMark Andrews# Include common targets.