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# 25a0900badSGarrett 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 45*b6805bf7SGordon RossLINT_LIBS = \ 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 51*b6805bf7SGordon RossI86XPV_LINTS = xdb xnb xnbe xnbo xnbu xpvtap 52*b6805bf7SGordon Ross 53843e1988Sjohnlev# 54843e1988Sjohnlev# 55843e1988Sjohnlev# 56843e1988Sjohnlevdef := TARGET= def 57843e1988Sjohnlevall := TARGET= all 58843e1988Sjohnlevinstall := TARGET= install 59843e1988Sjohnlevclean := TARGET= clean 60843e1988Sjohnlevclobber := TARGET= clobber 61843e1988Sjohnlevlint := TARGET= lint 62843e1988Sjohnlevlintlib := TARGET= lintlib 63843e1988Sjohnlevmachmodlintlib := TARGET= modlintlib 64843e1988Sjohnlevmodlist := TARGET= modlist 65843e1988Sjohnlevmodlist modlist.intel := NO_STATE= -K $$MODSTATE$$$$ 66843e1988Sjohnlevclean.lint := TARGET= clean.lint 67843e1988Sjohnlevcheck := TARGET= check 68843e1988Sjohnlev 69843e1988Sjohnlev.KEEP_STATE: 70843e1988Sjohnlev 71843e1988Sjohnlev.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 72843e1988Sjohnlev modlist modlist.intel 73843e1988Sjohnlev 74843e1988SjohnlevINITIAL_TARGETS = \ 75843e1988Sjohnlev genassym \ 76a0900badSGarrett D'Amore unix \ 77a0900badSGarrett D'Amore cpu/scripts 78843e1988Sjohnlev 79843e1988Sjohnlevdef all clean clobber clean.lint: setup genassym unix .WAIT \ 80843e1988Sjohnlev $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 81843e1988Sjohnlev 82843e1988Sjohnlevinstall: install_platforms setup genassym unix .WAIT \ 83843e1988Sjohnlev $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 84843e1988Sjohnlev 85*b6805bf7SGordon Ross# Need to clean in here too because of lint. 86*b6805bf7SGordon Rossclean: $(I86XPV_LINTS) 87*b6805bf7SGordon Ross 88843e1988Sjohnlev# list the modules under i86xpv. 89843e1988Sjohnlevmodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 90843e1988Sjohnlev 91843e1988Sjohnlev# list the modules for Install -k i86xpv. 92843e1988Sjohnlevmodlist.karch: modlist modlist.intel 93843e1988Sjohnlev 94843e1988Sjohnlevmodlist.intel: 95843e1988Sjohnlev @cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist 96843e1988Sjohnlev 97843e1988Sjohnlevlintlib: unix 98843e1988Sjohnlev 99843e1988Sjohnlevmodlintlib: $(KMODS) $(CLOSED_KMODS) 100843e1988Sjohnlev 101843e1988Sjohnlevgenassym unix $(KMODS): FRC 102843e1988Sjohnlev @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 103843e1988Sjohnlev 104843e1988Sjohnlevsetup: FRC 105a0900badSGarrett D'Amore @cd cpu/scripts; pwd; $(MAKE) $(TARGET) 106843e1988Sjohnlev 107843e1988Sjohnlev$(XMODS): FRC 108843e1988Sjohnlev @if [ -f $@/Makefile ]; then \ 109843e1988Sjohnlev cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 110843e1988Sjohnlev else \ 111843e1988Sjohnlev true; \ 112843e1988Sjohnlev fi 113843e1988Sjohnlev 114843e1988Sjohnlev$(CLOSED_KMODS): FRC 115843e1988Sjohnlev cd $(CLOSED)/uts/i86xpv/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 116843e1988Sjohnlev 117843e1988Sjohnlev$(CLOSED_XMODS): FRC 118843e1988Sjohnlev @if [ -f $(CLOSED)/uts/i86xpv/$@/Makefile ]; then \ 119843e1988Sjohnlev cd $(CLOSED)/uts/i86xpv/$@; pwd; \ 120843e1988Sjohnlev $(MAKE) $(NO_STATE) $(TARGET); \ 121843e1988Sjohnlev else \ 122843e1988Sjohnlev true; \ 123843e1988Sjohnlev fi 124843e1988Sjohnlev 125843e1988Sjohnlevinstall_h check: FRC 126843e1988Sjohnlev @cd sys; pwd; $(MAKE) $(TARGET) 127843e1988Sjohnlev 128843e1988Sjohnlev# 129843e1988Sjohnlev# Definitions for the /platform directory aliases. 130843e1988Sjohnlev# Currently none for i86xpv. 131843e1988Sjohnlev# 132843e1988SjohnlevPLAT_LINKS = 133843e1988Sjohnlev 134843e1988Sjohnlev# 135843e1988Sjohnlev# Make the /platform directories. This is hardwired here because 136843e1988Sjohnlev# the first stage of the project (KBI) only implements the userland 137843e1988Sjohnlev# changes, but the only reasonable place to record the aliases is 138843e1988Sjohnlev# here in kernel land. 139843e1988Sjohnlev# 140843e1988Sjohnlevinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 141843e1988Sjohnlev $(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \ 142843e1988Sjohnlev $(OEM_USR_PLAT_LINKS) 143843e1988Sjohnlev 144843e1988Sjohnlev# 145843e1988Sjohnlev# Full kernel lint target. 146843e1988Sjohnlev# 147843e1988SjohnlevLINT_TARGET = globallint 148843e1988Sjohnlev 149843e1988Sjohnlev# workaround for multiply defined errors 150843e1988Sjohnlevgloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 151843e1988Sjohnlev 152843e1988Sjohnlevgloballint: 153843e1988Sjohnlev @-$(ECHO) "\nFULL KERNEL: global crosschecks:" 154*b6805bf7SGordon Ross @-$(LINT) $(LINTFLAGS) $(LINT_LIB) $(LINT_LIBS) 2>&1 | $(LGREP.2) 155843e1988Sjohnlev 156843e1988Sjohnlevlint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS) 157843e1988Sjohnlev 158843e1988Sjohnlev$(INTEL_LINTS): FRC 159843e1988Sjohnlev @cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib 160843e1988Sjohnlev 161843e1988SjohnlevFRC: 162843e1988Sjohnlev 163843e1988Sjohnlevinclude ../Makefile.targ 164843e1988Sjohnlev 165843e1988Sjohnlev# 166843e1988Sjohnlev# Cross-reference customization: build a cross-reference over all of the 167843e1988Sjohnlev# i86pc-related directories. 168843e1988Sjohnlev# 169843e1988SjohnlevSHARED_XRDIRS = ../i86xpv ../i86pc ../intel ../common 170843e1988SjohnlevXRDIRS = $(SHARED_XRDIRS) 171843e1988SjohnlevCLOSED_XRDIRS1 = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%) 172843e1988SjohnlevCLOSED_XRDIRS2 = $(CLOSED_XRDIRS1:../../../closed/uts/i86pc=) 173843e1988Sjohnlev$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS2:../../../closed/uts/i86xpv=) 174843e1988SjohnlevXRPRUNE = sun4v sun4u sun4 sfmmu sparc 175843e1988Sjohnlev 176843e1988Sjohnlevcscope.out tags: FRC 177843e1988Sjohnlev $(XREF) -x $@ 178