Makefile revision 3f7d54a6b84904c8f4d8daa4c7b577bede7df8b9
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# CDDL HEADER START
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# The contents of this file are subject to the terms of the
6ae232055d4d8a97267517c5e50074c2c819941and# Common Development and Distribution License (the "License").
6ae232055d4d8a97267517c5e50074c2c819941and# You may not use this file except in compliance with the License.
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6ae232055d4d8a97267517c5e50074c2c819941and# or http://www.opensolaris.org/os/licensing.
6ae232055d4d8a97267517c5e50074c2c819941and# See the License for the specific language governing permissions
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# and limitations under the License.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen#
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# When distributing Covered Code, include this CDDL HEADER in each
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6ae232055d4d8a97267517c5e50074c2c819941and# If applicable, add the following below this CDDL HEADER, with the
6ae232055d4d8a97267517c5e50074c2c819941and# fields enclosed by brackets "[]" replaced with your own identifying
6ae232055d4d8a97267517c5e50074c2c819941and# information: Portions Copyright [yyyy] [name of copyright owner]
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen#
3f08db06526d6901aa08c110b5bc7dde6bc39905nd# CDDL HEADER END
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# uts/intel/Makefile
6ae232055d4d8a97267517c5e50074c2c819941and#
b43f840409794ed298e8634f6284741f193b6c4ftakashi# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
6ae232055d4d8a97267517c5e50074c2c819941and# Use is subject to license terms.
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# This makefile drives the production of all implementation architecture
b43f840409794ed298e8634f6284741f193b6c4ftakashi# independent modules for Intel processors.
6ae232055d4d8a97267517c5e50074c2c819941and
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiUTSBASE = ..
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung
6ae232055d4d8a97267517c5e50074c2c819941andinclude Makefile.intel
b43f840409794ed298e8634f6284741f193b6c4ftakashi
b43f840409794ed298e8634f6284741f193b6c4ftakashiLINT_KMODS_X1 = $(LINT_KMODS:nsmb=)
b43f840409794ed298e8634f6284741f193b6c4ftakashiLINT_KMODS_X2 = $(LINT_KMODS_X1:smbfs=)
b43f840409794ed298e8634f6284741f193b6c4ftakashiLINT_KMODLIBS = $(LINT_KMODS_X2:e1000g=)
6ae232055d4d8a97267517c5e50074c2c819941andLINT_LIBS = $(LINT_LIB) $(GEN_LINT_LIB) \
6ae232055d4d8a97267517c5e50074c2c819941and $(LINT_KMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
6ae232055d4d8a97267517c5e50074c2c819941and $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and# EXPORT DELETE START
6ae232055d4d8a97267517c5e50074c2c819941and$(CLOSED_BUILD)LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
6ae232055d4d8a97267517c5e50074c2c819941and$(CLOSED_BUILD)LINT_CLOSED_XMOD5 = $(CLOSED_XMODS:bnx=)
6ae232055d4d8a97267517c5e50074c2c819941and$(CLOSED_BUILD)LINT_CLOSED_XMOD4 = $(LINT_CLOSED_XMOD5:bnxe=)
6ae232055d4d8a97267517c5e50074c2c819941and$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(LINT_CLOSED_XMOD4:lsimega=)
6ae232055d4d8a97267517c5e50074c2c819941and$(CLOSED_BUILD)LINT_CLOSED_XMOD2 = $(LINT_CLOSED_XMOD3:spwr=)
6ae232055d4d8a97267517c5e50074c2c819941and$(CLOSED_BUILD)LINT_CLOSED_XMOD1 = $(LINT_CLOSED_XMOD2:adpu320=)
6ae232055d4d8a97267517c5e50074c2c819941and$(CLOSED_BUILD)LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# dprov is delivered in the SUNWcryptoint package.
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941andDRV_KMODS += dprov
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and# EXPORT DELETE END
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941anddef := TARGET= def
6ae232055d4d8a97267517c5e50074c2c819941anddef.prereq := TARGET= def
6ae232055d4d8a97267517c5e50074c2c819941andall := TARGET= all
6ae232055d4d8a97267517c5e50074c2c819941andall.prereq := TARGET= all
6ae232055d4d8a97267517c5e50074c2c819941andinstall := TARGET= install
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohinstall.prereq := TARGET= all
6ae232055d4d8a97267517c5e50074c2c819941andclean := TARGET= clean
6ae232055d4d8a97267517c5e50074c2c819941andclobber := TARGET= clobber
6ae232055d4d8a97267517c5e50074c2c819941andlint := TARGET= lint
6ae232055d4d8a97267517c5e50074c2c819941andlint.prereq := TARGET= lint
6ae232055d4d8a97267517c5e50074c2c819941andmodlintlib := TARGET= modlintlib
6ae232055d4d8a97267517c5e50074c2c819941andmodlist := TARGET= modlist
6ae232055d4d8a97267517c5e50074c2c819941andmodlist := NO_STATE= -K $$MODSTATE$$$$
6ae232055d4d8a97267517c5e50074c2c819941andclean.lint := TARGET= clean.lint
6ae232055d4d8a97267517c5e50074c2c819941andcheck := TARGET= check
6ae232055d4d8a97267517c5e50074c2c819941andinstall_h := TARGET= install_h
6ae232055d4d8a97267517c5e50074c2c819941andinstall_h.prereq := TARGET= install_h
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and.KEEP_STATE:
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \
6ae232055d4d8a97267517c5e50074c2c819941and $(CLOSED_XMODS) config $(LINT_DEPS)
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941anddef all install clean clobber modlist: genassym $(KMODS) $(CLOSED_KMODS) \
6ae232055d4d8a97267517c5e50074c2c819941and $(SVVS) $(XMODS) $(CLOSED_XMODS) config
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# Privilege constants
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941and# NOTE: The rules for generating priv_const.c file are shared between all
6ae232055d4d8a97267517c5e50074c2c819941and# processor architectures and and should be kept in sync. If they are changed in
6ae232055d4d8a97267517c5e50074c2c819941and# this file make sure that sparc rules are updated as well.
6ae232055d4d8a97267517c5e50074c2c819941and#
6ae232055d4d8a97267517c5e50074c2c819941andPRIVS_C = $(SRC)/uts/common/os/priv_const.c
b43f840409794ed298e8634f6284741f193b6c4ftakashi
6ae232055d4d8a97267517c5e50074c2c819941and$(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF)
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh#
ba543b319188dc1887607f6d59feddc00e38eee2humbedooh# Prerequisites
ba543b319188dc1887607f6d59feddc00e38eee2humbedooh#
ba543b319188dc1887607f6d59feddc00e38eee2humbedooh# The uts/Makefile defines build parallelism for x86 platforms such that i86pc,
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# i86xpv and intel are all built in parallel. This requires building certain
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# parts before the parallel build can start. The uts/Makefile appends the
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# '.prereq' string to the original target and executes this Makefile to build
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# any prerequisites needed before the full parallel build can start. After that
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# make continues with normal targets.
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh#
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# Any build prerequisites for x86 builds should be described here.
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh#
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# genassym is used to build intel/dtrace and genunix, so it should be built
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# first.
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh#
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# priv_const.c is required to build genunix.
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh#
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# genunix is used by everyone to ctf-merge with. Genunix is CTF-merged with
b43f840409794ed298e8634f6284741f193b6c4ftakashi# intel/ip so as a side effect this dependency builds intel/ip as part of the
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen# prerequisites.
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd#
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd# intel/dtrace depends on i86pc/genassym, so we need to build both
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd# i86pc/genassym and intel/genassym.
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd#
6ae232055d4d8a97267517c5e50074c2c819941andall.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