1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate# with the License. 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate# and limitations under the License. 13*7c478bd9Sstevel@tonic-gate# 14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate# 20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate# 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate# 26*7c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 27*7c478bd9Sstevel@tonic-gate# 28*7c478bd9Sstevel@tonic-gate# This makefile drives the production of all implementation architecture 29*7c478bd9Sstevel@tonic-gate# dependent modules for the sun4v architecture. 30*7c478bd9Sstevel@tonic-gate# 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gateUTSBASE = .. 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gateinclude Makefile.sun4v 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate# 37*7c478bd9Sstevel@tonic-gate# The following are SPARC specific (rather than sun4v) specific modules 38*7c478bd9Sstevel@tonic-gate# which are required for the sun4v kernel to completely lint. They are 39*7c478bd9Sstevel@tonic-gate# not involved in the build in any other way. In order to minimize 40*7c478bd9Sstevel@tonic-gate# build time, it is assumed that they are up to date. But since sun4v 41*7c478bd9Sstevel@tonic-gate# is really a separate architecture we cannot use the v7 sparc modules. 42*7c478bd9Sstevel@tonic-gate# 43*7c478bd9Sstevel@tonic-gateSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gateSPARC_LINTS = 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate# 48*7c478bd9Sstevel@tonic-gate# 49*7c478bd9Sstevel@tonic-gate# 50*7c478bd9Sstevel@tonic-gateLINT_LIBS = $(LINT_LIB) \ 51*7c478bd9Sstevel@tonic-gate $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 52*7c478bd9Sstevel@tonic-gate $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln) 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gatedef := TARGET= def 55*7c478bd9Sstevel@tonic-gateall := TARGET= all 56*7c478bd9Sstevel@tonic-gateinstall := TARGET= install 57*7c478bd9Sstevel@tonic-gateinstall_h := TARGET= install_h 58*7c478bd9Sstevel@tonic-gateclean := TARGET= clean 59*7c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 60*7c478bd9Sstevel@tonic-gatelint := TARGET= lint 61*7c478bd9Sstevel@tonic-gatelintlib := TARGET= lintlib 62*7c478bd9Sstevel@tonic-gatemodlintlib := TARGET= modlintlib 63*7c478bd9Sstevel@tonic-gateclean.lint := TARGET= clean.lint 64*7c478bd9Sstevel@tonic-gatecheck := TARGET= check 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate.KEEP_STATE: 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate.PARALLEL: $(KMODS) $(XMODS) 69*7c478bd9Sstevel@tonic-gate 70*7c478bd9Sstevel@tonic-gate# Override for CPU_KMODS... they cannot be built 71*7c478bd9Sstevel@tonic-gate# in parallel 72*7c478bd9Sstevel@tonic-gate.NO_PARALLEL: $(CPU_KMODS) 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gatedef all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) \ 75*7c478bd9Sstevel@tonic-gate $(IMPLEMENTATIONS) 76*7c478bd9Sstevel@tonic-gate 77*7c478bd9Sstevel@tonic-gateinstall: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) \ 78*7c478bd9Sstevel@tonic-gate $(IMPLEMENTATIONS) 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gatelintlib: unix 81*7c478bd9Sstevel@tonic-gate 82*7c478bd9Sstevel@tonic-gatemodlintlib: $(LINT_KMODS) 83*7c478bd9Sstevel@tonic-gate 84*7c478bd9Sstevel@tonic-gategenassym unix $(KMODS) $(IMPLEMENTATIONS): FRC 85*7c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 86*7c478bd9Sstevel@tonic-gate 87*7c478bd9Sstevel@tonic-gate$(XMODS): FRC 88*7c478bd9Sstevel@tonic-gate @if [ -f $@/Makefile ]; then \ 89*7c478bd9Sstevel@tonic-gate cd $@; pwd; $(MAKE) $(TARGET); \ 90*7c478bd9Sstevel@tonic-gate else \ 91*7c478bd9Sstevel@tonic-gate true; \ 92*7c478bd9Sstevel@tonic-gate fi 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gateinstall_h check: install_platforms $(IMPLEMENTATIONS) FRC 95*7c478bd9Sstevel@tonic-gate @cd sys; pwd; $(MAKE) $(TARGET) 96*7c478bd9Sstevel@tonic-gate @cd vm; pwd; $(MAKE) $(TARGET) 97*7c478bd9Sstevel@tonic-gate 98*7c478bd9Sstevel@tonic-gate# 99*7c478bd9Sstevel@tonic-gate# Rules for the /platforms directories. This is hardwired here because 100*7c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 101*7c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 102*7c478bd9Sstevel@tonic-gate# here in kernel land. 103*7c478bd9Sstevel@tonic-gate# 104*7c478bd9Sstevel@tonic-gate$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR) 105*7c478bd9Sstevel@tonic-gate -$(INS.dir.root.sys) 106*7c478bd9Sstevel@tonic-gate 107*7c478bd9Sstevel@tonic-gate# 108*7c478bd9Sstevel@tonic-gate# create directories in /usr/platform/ for the implementations that are 109*7c478bd9Sstevel@tonic-gate# defined in $(IMPLEMENTED_PLATFORM) 110*7c478bd9Sstevel@tonic-gate# 111*7c478bd9Sstevel@tonic-gate 112*7c478bd9Sstevel@tonic-gate# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS) 113*7c478bd9Sstevel@tonic-gate# that are linked to it. 114*7c478bd9Sstevel@tonic-gate# 115*7c478bd9Sstevel@tonic-gate$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR) 116*7c478bd9Sstevel@tonic-gate -$(INS.dir.root.sys) 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate# 119*7c478bd9Sstevel@tonic-gate# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS) 120*7c478bd9Sstevel@tonic-gate# to it's corresponding $(IMPLEMENTED_PLATFORM). 121*7c478bd9Sstevel@tonic-gate# 122*7c478bd9Sstevel@tonic-gatePLATFORMS = $(LINKED_PLATFORMS) 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate$(USR_PLAT_DIRS): $(USR_PLAT_DIR) 125*7c478bd9Sstevel@tonic-gate $(INS.slink3) 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gatePLATFORMS += $(IMPLEMENTED_PLATFORM) 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gate# 130*7c478bd9Sstevel@tonic-gate# Make the /platforms directories. This is hardwired here because 131*7c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 132*7c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 133*7c478bd9Sstevel@tonic-gate# here in kernel land. 134*7c478bd9Sstevel@tonic-gate# 135*7c478bd9Sstevel@tonic-gateinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 136*7c478bd9Sstevel@tonic-gate $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \ 137*7c478bd9Sstevel@tonic-gate $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \ 138*7c478bd9Sstevel@tonic-gate $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR) 139*7c478bd9Sstevel@tonic-gate 140*7c478bd9Sstevel@tonic-gate# 141*7c478bd9Sstevel@tonic-gate# rules for making include, sbin, lib dirs/links in 142*7c478bd9Sstevel@tonic-gate# /usr/platform/$(PLATFORM)/ for desktop platforms 143*7c478bd9Sstevel@tonic-gate# 144*7c478bd9Sstevel@tonic-gate$(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR) 145*7c478bd9Sstevel@tonic-gate $(INS.slink4) 146*7c478bd9Sstevel@tonic-gate 147*7c478bd9Sstevel@tonic-gate$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR) 148*7c478bd9Sstevel@tonic-gate $(INS.slink5) 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR) 151*7c478bd9Sstevel@tonic-gate -$(INS.dir.root.bin) 152*7c478bd9Sstevel@tonic-gate 153*7c478bd9Sstevel@tonic-gate# 154*7c478bd9Sstevel@tonic-gate# Full kernel lint target. 155*7c478bd9Sstevel@tonic-gate# 156*7c478bd9Sstevel@tonic-gateLINT_TARGET = globallint 157*7c478bd9Sstevel@tonic-gate 158*7c478bd9Sstevel@tonic-gategloballint: 159*7c478bd9Sstevel@tonic-gate @-$(ECHO) "\nSUN4V KERNEL: global crosschecks:" 160*7c478bd9Sstevel@tonic-gate @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) 161*7c478bd9Sstevel@tonic-gate 162*7c478bd9Sstevel@tonic-gatelint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \ 163*7c478bd9Sstevel@tonic-gate $(IMPLEMENTATIONS) 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate# EXPORT DELETE START 166*7c478bd9Sstevel@tonic-gate 167*7c478bd9Sstevel@tonic-gateEXPORT_SRC: 168*7c478bd9Sstevel@tonic-gate $(RM) Makefile+ 169*7c478bd9Sstevel@tonic-gate sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 170*7c478bd9Sstevel@tonic-gate < Makefile > Makefile+ 171*7c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 172*7c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile 173*7c478bd9Sstevel@tonic-gate 174*7c478bd9Sstevel@tonic-gate# EXPORT DELETE END 175*7c478bd9Sstevel@tonic-gate 176*7c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate# 179*7c478bd9Sstevel@tonic-gate# Cross-reference customization: build a cross-reference over all of the 180*7c478bd9Sstevel@tonic-gate# sun4v-related directories. 181*7c478bd9Sstevel@tonic-gate# 182*7c478bd9Sstevel@tonic-gateXRDIRS = ../sun4v ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common 183*7c478bd9Sstevel@tonic-gateXRPRUNE = i86pc 184*7c478bd9Sstevel@tonic-gate 185*7c478bd9Sstevel@tonic-gatecscope.out tags: FRC 186*7c478bd9Sstevel@tonic-gate $(XREF) -x $@ 187