1843e1988Sjohnlev# 2843e1988Sjohnlev# CDDL HEADER START 3843e1988Sjohnlev# 4843e1988Sjohnlev# The contents of this file are subject to the terms of the 5843e1988Sjohnlev# Common Development and Distribution License (the "License"). 6843e1988Sjohnlev# You may not use this file except in compliance with the License. 7843e1988Sjohnlev# 8843e1988Sjohnlev# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9843e1988Sjohnlev# or http://www.opensolaris.org/os/licensing. 10843e1988Sjohnlev# See the License for the specific language governing permissions 11843e1988Sjohnlev# and limitations under the License. 12843e1988Sjohnlev# 13843e1988Sjohnlev# When distributing Covered Code, include this CDDL HEADER in each 14843e1988Sjohnlev# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15843e1988Sjohnlev# If applicable, add the following below this CDDL HEADER, with the 16843e1988Sjohnlev# fields enclosed by brackets "[]" replaced with your own identifying 17843e1988Sjohnlev# information: Portions Copyright [yyyy] [name of copyright owner] 18843e1988Sjohnlev# 19843e1988Sjohnlev# CDDL HEADER END 20843e1988Sjohnlev# 21843e1988Sjohnlev# 22843e1988Sjohnlev# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23843e1988Sjohnlev# Use is subject to license terms. 24843e1988Sjohnlev# 25*a0900badSGarrett D'Amore# Copyright 2013 Nexenta Systems, Inc. All rights reserved. 26843e1988Sjohnlev# 27843e1988Sjohnlev# This makefile drives the production of all implementation architecture 28843e1988Sjohnlev# dependent modules for the i86xpv architecture. 29843e1988Sjohnlev# 30843e1988Sjohnlev 31843e1988SjohnlevUTSBASE = .. 32843e1988Sjohnlev 33843e1988Sjohnlevinclude Makefile.i86xpv 34843e1988Sjohnlev 35843e1988Sjohnlev# 36843e1988Sjohnlev# The following are x86 specific (rather than i86pc) specific modules 37843e1988Sjohnlev# which are required for the i86pc kernel to completely lint. They are 38843e1988Sjohnlev# not involved in the build in any other way. In order to minimize 39843e1988Sjohnlev# build time, it is assumed that they are up to date. 40843e1988Sjohnlev# 41843e1988SjohnlevINTEL_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR) 42843e1988Sjohnlev 43843e1988SjohnlevINTEL_LINTS = genunix 44843e1988Sjohnlev 45843e1988SjohnlevLINT_LIBS = $(LINT_LIB) \ 46843e1988Sjohnlev $(GENUNIX_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 47843e1988Sjohnlev $(PARALLEL_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 48843e1988Sjohnlev $(CLOSED_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 49843e1988Sjohnlev $(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln) 50843e1988Sjohnlev 51843e1988Sjohnlev# 52843e1988Sjohnlev# 53843e1988Sjohnlev# 54843e1988Sjohnlevdef := TARGET= def 55843e1988Sjohnlevall := TARGET= all 56843e1988Sjohnlevinstall := TARGET= install 57843e1988Sjohnlevclean := TARGET= clean 58843e1988Sjohnlevclobber := TARGET= clobber 59843e1988Sjohnlevlint := TARGET= lint 60843e1988Sjohnlevlintlib := TARGET= lintlib 61843e1988Sjohnlevmachmodlintlib := TARGET= modlintlib 62843e1988Sjohnlevmodlist := TARGET= modlist 63843e1988Sjohnlevmodlist modlist.intel := NO_STATE= -K $$MODSTATE$$$$ 64843e1988Sjohnlevclean.lint := TARGET= clean.lint 65843e1988Sjohnlevcheck := TARGET= check 66843e1988Sjohnlev 67843e1988Sjohnlev.KEEP_STATE: 68843e1988Sjohnlev 69843e1988Sjohnlev.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 70843e1988Sjohnlev modlist modlist.intel 71843e1988Sjohnlev 72843e1988SjohnlevINITIAL_TARGETS = \ 73843e1988Sjohnlev genassym \ 74*a0900badSGarrett D'Amore unix \ 75*a0900badSGarrett D'Amore cpu/scripts 76843e1988Sjohnlev 77843e1988Sjohnlevdef all clean clobber clean.lint: setup genassym unix .WAIT \ 78843e1988Sjohnlev $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 79843e1988Sjohnlev 80843e1988Sjohnlevinstall: install_platforms setup genassym unix .WAIT \ 81843e1988Sjohnlev $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 82843e1988Sjohnlev 83843e1988Sjohnlev# list the modules under i86xpv. 84843e1988Sjohnlevmodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 85843e1988Sjohnlev 86843e1988Sjohnlev# list the modules for Install -k i86xpv. 87843e1988Sjohnlevmodlist.karch: modlist modlist.intel 88843e1988Sjohnlev 89843e1988Sjohnlevmodlist.intel: 90843e1988Sjohnlev @cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist 91843e1988Sjohnlev 92843e1988Sjohnlevlintlib: unix 93843e1988Sjohnlev 94843e1988Sjohnlevmodlintlib: $(KMODS) $(CLOSED_KMODS) 95843e1988Sjohnlev 96843e1988Sjohnlevgenassym unix $(KMODS): FRC 97843e1988Sjohnlev @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 98843e1988Sjohnlev 99843e1988Sjohnlevsetup: FRC 100*a0900badSGarrett D'Amore @cd cpu/scripts; pwd; $(MAKE) $(TARGET) 101843e1988Sjohnlev 102843e1988Sjohnlev$(XMODS): FRC 103843e1988Sjohnlev @if [ -f $@/Makefile ]; then \ 104843e1988Sjohnlev cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 105843e1988Sjohnlev else \ 106843e1988Sjohnlev true; \ 107843e1988Sjohnlev fi 108843e1988Sjohnlev 109843e1988Sjohnlev$(CLOSED_KMODS): FRC 110843e1988Sjohnlev cd $(CLOSED)/uts/i86xpv/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 111843e1988Sjohnlev 112843e1988Sjohnlev$(CLOSED_XMODS): FRC 113843e1988Sjohnlev @if [ -f $(CLOSED)/uts/i86xpv/$@/Makefile ]; then \ 114843e1988Sjohnlev cd $(CLOSED)/uts/i86xpv/$@; pwd; \ 115843e1988Sjohnlev $(MAKE) $(NO_STATE) $(TARGET); \ 116843e1988Sjohnlev else \ 117843e1988Sjohnlev true; \ 118843e1988Sjohnlev fi 119843e1988Sjohnlev 120843e1988Sjohnlevinstall_h check: FRC 121843e1988Sjohnlev @cd sys; pwd; $(MAKE) $(TARGET) 122843e1988Sjohnlev 123843e1988Sjohnlev# 124843e1988Sjohnlev# Definitions for the /platform directory aliases. 125843e1988Sjohnlev# Currently none for i86xpv. 126843e1988Sjohnlev# 127843e1988SjohnlevPLAT_LINKS = 128843e1988Sjohnlev 129843e1988Sjohnlev# 130843e1988Sjohnlev# Make the /platform directories. This is hardwired here because 131843e1988Sjohnlev# the first stage of the project (KBI) only implements the userland 132843e1988Sjohnlev# changes, but the only reasonable place to record the aliases is 133843e1988Sjohnlev# here in kernel land. 134843e1988Sjohnlev# 135843e1988Sjohnlevinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 136843e1988Sjohnlev $(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \ 137843e1988Sjohnlev $(OEM_USR_PLAT_LINKS) 138843e1988Sjohnlev 139843e1988Sjohnlev# 140843e1988Sjohnlev# Full kernel lint target. 141843e1988Sjohnlev# 142843e1988SjohnlevLINT_TARGET = globallint 143843e1988Sjohnlev 144843e1988Sjohnlev# workaround for multiply defined errors 145843e1988Sjohnlevgloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 146843e1988Sjohnlev 147843e1988Sjohnlevgloballint: 148843e1988Sjohnlev @-$(ECHO) "\nFULL KERNEL: global crosschecks:" 149843e1988Sjohnlev @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) 150843e1988Sjohnlev 151843e1988Sjohnlevlint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS) 152843e1988Sjohnlev 153843e1988Sjohnlev$(INTEL_LINTS): FRC 154843e1988Sjohnlev @cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib 155843e1988Sjohnlev 156843e1988SjohnlevFRC: 157843e1988Sjohnlev 158843e1988Sjohnlevinclude ../Makefile.targ 159843e1988Sjohnlev 160843e1988Sjohnlev# 161843e1988Sjohnlev# Cross-reference customization: build a cross-reference over all of the 162843e1988Sjohnlev# i86pc-related directories. 163843e1988Sjohnlev# 164843e1988SjohnlevSHARED_XRDIRS = ../i86xpv ../i86pc ../intel ../common 165843e1988SjohnlevXRDIRS = $(SHARED_XRDIRS) 166843e1988SjohnlevCLOSED_XRDIRS1 = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%) 167843e1988SjohnlevCLOSED_XRDIRS2 = $(CLOSED_XRDIRS1:../../../closed/uts/i86pc=) 168843e1988Sjohnlev$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS2:../../../closed/uts/i86xpv=) 169843e1988SjohnlevXRPRUNE = sun4v sun4u sun4 sfmmu sparc 170843e1988Sjohnlev 171843e1988Sjohnlevcscope.out tags: FRC 172843e1988Sjohnlev $(XREF) -x $@ 173