Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# CDDL HEADER START
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# The contents of this file are subject to the terms of the
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# Common Development and Distribution License (the "License").
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# You may not use this file except in compliance with the License.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# or http://www.opensolaris.org/os/licensing.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# See the License for the specific language governing permissions
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# and limitations under the License.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# When distributing Covered Code, include this CDDL HEADER in each
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# If applicable, add the following below this CDDL HEADER, with the
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# fields enclosed by brackets "[]" replaced with your own identifying
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# information: Portions Copyright [yyyy] [name of copyright owner]
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# CDDL HEADER END
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# Use is subject to license terms.
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# ident "%Z%%M% %I% %E% SMI"
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# This makefile drives the production of all implementation architecture
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# dependent modules for the i86pc architecture.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk HoganUTSBASE = ..
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganinclude Makefile.i86pc
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# The following are x86 specific (rather than i86pc) specific modules
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# which are required for the i86pc kernel to completely lint. They are
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# not involved in the build in any other way. In order to minimize
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# build time, it is assumed that they are up to date.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk HoganINTEL_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk HoganINTEL_LINTS = genunix
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk HoganLINT_LIBS = $(LINT_LIB) \
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan $(KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan $(CLOSED_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan $(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln)
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan#
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogandef := TARGET= def
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganall := TARGET= all
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganinstall := TARGET= install
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganclean := TARGET= clean
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganclobber := TARGET= clobber
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganlint := TARGET= lint
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganlintlib := TARGET= lintlib
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganmachmodlintlib := TARGET= modlintlib
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganmodlist := TARGET= modlist
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganmodlist modlist.intel := NO_STATE= -K $$MODSTATE$$$$
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganclean.lint := TARGET= clean.lint
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogancheck := TARGET= check
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan.KEEP_STATE:
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan modlist modlist.intel
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk HoganINITIAL_TARGETS = \
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan genassym \
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan unix \
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan cpu/scripts
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogandef all clean clobber clean.lint: setup genassym unix .WAIT \
4a642b683ca0842ad671e9e1972110e0a3b1cf60Dirk Hogan $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS)
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganinstall: install_platforms setup genassym unix .WAIT \
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS)
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# list the modules under i86pc.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganmodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS)
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan# list the modules for Install -k i86pc.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hoganmodlist.karch: modlist modlist.intel
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
modlist.intel:
@cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist
lintlib: unix
modlintlib: $(KMODS) $(CLOSED_KMODS)
genassym unix $(KMODS): FRC
@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
setup: FRC
@cd cpu/scripts; pwd; $(MAKE) setup
$(XMODS): FRC
@if [ -f $@/Makefile ]; then \
cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
$(CLOSED_KMODS): FRC
cd $(CLOSED)/uts/i86pc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(CLOSED_XMODS): FRC
@if [ -f $(CLOSED)/uts/i86pc/$@/Makefile ]; then \
cd $(CLOSED)/uts/i86pc/$@; pwd; \
$(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
install_h check: FRC
@cd sys; pwd; $(MAKE) $(TARGET)
#
# For some x86 OEMs that deliver their own platform kernel modules but
# will not deliver anything in usr/platform, they should add their platforms
# here so a symlink will be created to the standard usr/platform/i86pc.
#
OEM_LINKS = ncri86pc
OEM_USR_PLAT_LINKS = $(OEM_LINKS:%=$(USR_PLAT_DIR)/%)
$(OEM_USR_PLAT_LINKS):
$(INS.slink1)
#
# Definitions for the /platform directory aliases.
# Currently none for i86pc.
#
PLAT_LINKS =
#
# Make the /platform directories. This is hardwired here because
# the first stage of the project (KBI) only implements the userland
# changes, but the only reasonable place to record the aliases is
# here in kernel land.
#
install_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
$(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \
$(OEM_USR_PLAT_LINKS)
#
# Work-around to disable acpica global crosscheck lint warnings
#
LGREP.i86pc = grep -v 'i86pc/io/acpica'
#
# Full kernel lint target.
#
LINT_TARGET = globallint
# workaround for multiply defined errors
globallint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
globallint:
@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.i86pc) | $(LGREP.2)
lint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS)
$(INTEL_LINTS): FRC
@cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib
FRC:
include ../Makefile.targ
#
# Cross-reference customization: build a cross-reference over all of the
# i86pc-related directories.
#
SHARED_XRDIRS = ../i86pc ../intel ../common
XRDIRS = $(SHARED_XRDIRS)
$(CLOSED_BUILD)XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
XRPRUNE = sun4u sun4
cscope.out tags: FRC
$(XREF) -x $@