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