Makefile revision b6805bf78d2bbbeeaea8909a05623587b42d58b3
0N/A#
2362N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
2362N/A# uts/intel/Makefile
2362N/A#
2362N/A# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/A# This makefile drives the production of all implementation architecture
0N/A# independent modules for Intel processors.
0N/A
0N/AUTSBASE = ..
0N/A
0N/Ainclude Makefile.intel
0N/A
0N/ALINT_KMODS_X1 = $(LINT_KMODS:nsmb=)
0N/ALINT_KMODS_X2 = $(LINT_KMODS_X1:smbfs=)
0N/ALINT_KMODLIBS = $(LINT_KMODS_X2:e1000g=)
0N/ALINT_LIBS = $(LINT_LIB) $(GEN_LINT_LIB) \
0N/A $(LINT_KMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
0N/A $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
0N/A
0N/A$(CLOSED_BUILD)LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
0N/A$(CLOSED_BUILD)LINT_CLOSED_XMOD4 = $(CLOSED_XMODS:bnx=)
0N/A$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(LINT_CLOSED_XMOD4:bnxe=)
0N/A$(CLOSED_BUILD)LINT_CLOSED_XMOD2 = $(LINT_CLOSED_XMOD3:lsimega=)
0N/A$(CLOSED_BUILD)LINT_CLOSED_XMOD1 = $(LINT_CLOSED_XMOD2:adpu320=)
0N/A$(CLOSED_BUILD)LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
0N/A
0N/A#
0N/A# dprov is delivered in the SUNWcryptoint package.
0N/A#
0N/ADRV_KMODS += dprov
0N/A
0N/A#
0N/A#
0N/Adef := TARGET= def
0N/Adef.prereq := TARGET= def
0N/Aall := TARGET= all
0N/Aall.prereq := TARGET= all
0N/Ainstall := TARGET= install
0N/Ainstall.prereq := TARGET= all
0N/Aclean := TARGET= clean
0N/Aclobber := TARGET= clobber
0N/Alint := TARGET= lint
0N/Alint.prereq := TARGET= lint
0N/Amodlintlib := TARGET= modlintlib
0N/Amodlist := TARGET= modlist
0N/Amodlist := NO_STATE= -K $$MODSTATE$$$$
0N/Aclean.lint := TARGET= clean.lint
0N/Acheck := TARGET= check
0N/Ainstall_h := TARGET= install_h
0N/Ainstall_h.prereq := TARGET= install_h
0N/A
0N/A.KEEP_STATE:
0N/A
0N/A.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \
0N/A $(CLOSED_XMODS) config $(LINT_DEPS)
0N/A
0N/Adef all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) \
0N/A $(SVVS) $(XMODS) $(CLOSED_XMODS) config
0N/A
0N/Aclobber: clobber.targ
0N/A
0N/A#
0N/A# Privilege constants
0N/A#
0N/A# NOTE: The rules for generating priv_const.c file are shared between all
0N/A# processor architectures and and should be kept in sync. If they are changed in
0N/A# this file make sure that sparc rules are updated as well.
0N/A#
0N/APRIVS_C = $(SRC)/uts/common/os/priv_const.c
0N/A
0N/A$(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF)
0N/A $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
0N/A
0N/ACLOBBERFILES += $(PRIVS_C)
0N/A
0N/A#
0N/A# Prerequisites
0N/A#
0N/A# The uts/Makefile defines build parallelism for x86 platforms such that i86pc,
0N/A# i86xpv and intel are all built in parallel. This requires building certain
0N/A# parts before the parallel build can start. The uts/Makefile appends the
0N/A# '.prereq' string to the original target and executes this Makefile to build
0N/A# any prerequisites needed before the full parallel build can start. After that
0N/A# make continues with normal targets.
0N/A#
0N/A# Any build prerequisites for x86 builds should be described here.
0N/A#
0N/A# genassym is used to build intel/dtrace and genunix, so it should be built
0N/A# first.
0N/A#
0N/A# priv_const.c is required to build genunix.
0N/A#
0N/A# genunix is used by everyone to ctf-merge with. Genunix is CTF-merged with
0N/A# intel/ip so as a side effect this dependency builds intel/ip as part of the
0N/A# prerequisites.
0N/A#
0N/A# intel/dtrace depends on i86pc/genassym, so we need to build both
0N/A# i86pc/genassym and intel/genassym.
0N/A#
0N/Aall.prereq install.prereq def.prereq: genunix FRC
0N/A @cd ../i86pc/genassym; pwd; $(MAKE) $(@:%.prereq=%)
0N/A
0N/A#
0N/A# i86pc lint libraries should be built first
0N/A#
0N/Alint.prereq: FRC
0N/A @cd ../i86pc; pwd; $(MAKE) $(NO_STATE) lint
0N/A
0N/A#
0N/A# Nothing to do for any other prerequisite targets.
0N/A#
0N/A%.prereq:
0N/A
0N/Agenunix: $(PRIVS_C)
0N/A
0N/Amodlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
0N/A $(XMODS) $(CLOSED_XMODS)
0N/A
0N/A$(KMODS) $(SUBDIRS) config: FRC
0N/A @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
0N/A
0N/A$(CLOSED_KMODS): FRC
0N/A cd $(CLOSED)/uts/intel/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
0N/A
0N/A$(XMODS): FRC
0N/A @if [ -f $@/Makefile ]; then \
0N/A cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
0N/A else \
0N/A true; \
0N/A fi
0N/A
0N/A$(SVVS) $(CLOSED_XMODS): FRC
0N/A @if [ -f $(CLOSED)/uts/intel/$@/Makefile ]; then \
0N/A cd $(CLOSED)/uts/intel/$@; pwd; \
0N/A $(MAKE) $(NO_STATE) $(TARGET); \
0N/A else \
0N/A true; \
0N/A fi
0N/A
0N/Ainstall_h check: FRC
0N/A @cd sys; pwd; $(MAKE) $(TARGET)
0N/A @cd asm; pwd; $(MAKE) $(TARGET)
0N/A @cd ia32/sys; pwd; $(MAKE) $(TARGET)
0N/A @cd amd64/sys; pwd; $(MAKE) $(TARGET)
0N/A
0N/A#
0N/A# Work-around to disable acpica global crosscheck lint warnings
0N/A#
0N/ALGREP.intel = grep -v 'intel/io/acpica'
0N/A
0N/A#
0N/A# Full kernel lint target.
0N/A#
0N/ALINT_TARGET = globallint
0N/A
0N/A# workaround for multiply defined errors
0N/Agloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
0N/A
0N/Agloballint:
0N/A @pwd
0N/A @-$(ECHO) "\nFULL KERNEL: global crosschecks:"
0N/A @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.intel) | $(LGREP.2)
0N/A
0N/Alint: modlintlib .WAIT $(LINT_DEPS)
0N/A
0N/Ainclude ../Makefile.targ
0N/A