Makefile revision 6e91bba0d6c6bdabbba62cefae583715a4a58e2a
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# CDDL HEADER START
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# The contents of this file are subject to the terms of the
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Common Development and Distribution License (the "License").
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# You may not use this file except in compliance with the License.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# See the License for the specific language governing permissions
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# and limitations under the License.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# CDDL HEADER END
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Use is subject to license terms.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# This makefile drives the production of all implementation architecture
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# independent modules for Intel processors.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User $(LINT_KMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# EXPORT DELETE START
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(CLOSED_BUILD)LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(CLOSED_BUILD)LINT_CLOSED_XMOD5 = $(CLOSED_XMODS:bnx=)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(CLOSED_BUILD)LINT_CLOSED_XMOD4 = $(LINT_CLOSED_XMOD5:bnxe=)
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(LINT_CLOSED_XMOD4:lsimega=)
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User$(CLOSED_BUILD)LINT_CLOSED_XMOD2 = $(LINT_CLOSED_XMOD3:spwr=)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(CLOSED_BUILD)LINT_CLOSED_XMOD1 = $(LINT_CLOSED_XMOD2:adpu320=)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt$(CLOSED_BUILD)LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# dprov is delivered in the SUNWcryptoint package.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# EXPORT DELETE END
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox Userdef all install clean clobber modlist: genassym $(KMODS) $(CLOSED_KMODS) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Privilege constants
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# NOTE: The rules for generating priv_const.c file are shared between all
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# processor architectures and and should be kept in sync. If they are changed in
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# this file make sure that sparc rules are updated as well.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Prerequisites
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# The uts/Makefile defines build parallelism for x86 platforms such that i86pc,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# i86xpv and intel are all built in parallel. This requires building certain
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# parts before the parallel build can start. The uts/Makefile appends the
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# '.prereq' string to the original target and executes this Makefile to build
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# any prerequisites needed before the full parallel build can start. After that
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# make continues with normal targets.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Any build prerequisites for x86 builds should be described here.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# genassym is used to build intel/dtrace and genunix, so it should be built
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# priv_const.c is required to build genunix.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# genunix is used by everyone to ctf-merge with. Genunix is CTF-merged with
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# intel/ip so as a side effect this dependency builds intel/ip as part of the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# prerequisites.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# intel/dtrace depends on i86pc/genassym, so we need to build both
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox Userall.prereq install.prereq def.prereq: genassym genunix FRC
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User @cd ../i86pc/genassym; pwd; $(MAKE) $(@:%.prereq=%)
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# i86pc lint libraries should be built first
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Nothing to do for any other prerequisite targets.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usermodlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User cd $(CLOSED)/uts/intel/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User @if [ -f $@/Makefile ]; then \
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User @if [ -f $(CLOSED)/uts/intel/$@/Makefile ]; then \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Work-around to disable acpica global crosscheck lint warnings
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Full kernel lint target.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# workaround for multiply defined errors
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usergloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User @-$(ECHO) "\nFULL KERNEL: global crosschecks:"
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.intel) | $(LGREP.2)
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# EXPORT DELETE START
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# EXPORT DELETE END