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