17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 59ef7884dSanovick# Common Development and Distribution License (the "License"). 69ef7884dSanovick# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 22ae115bc7Smrj# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate# This makefile drives the production of all implementation architecture 287c478bd9Sstevel@tonic-gate# dependent modules for the sun4v architecture. 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateUTSBASE = .. 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gateinclude Makefile.sun4v 349ef7884dSanovickinclude Makefile.stpaul 35*a90d965dSfw157321include Makefile.huron 36ecb56eb0SwillardUSR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320 37ecb56eb0SwillardUSR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin 38ecb56eb0SwillardUSR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib 39ecb56eb0Swillard 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate# 427c478bd9Sstevel@tonic-gate# The following are SPARC specific (rather than sun4v) specific modules 437c478bd9Sstevel@tonic-gate# which are required for the sun4v kernel to completely lint. They are 447c478bd9Sstevel@tonic-gate# not involved in the build in any other way. In order to minimize 457c478bd9Sstevel@tonic-gate# build time, it is assumed that they are up to date. But since sun4v 467c478bd9Sstevel@tonic-gate# is really a separate architecture we cannot use the v7 sparc modules. 477c478bd9Sstevel@tonic-gate# 487c478bd9Sstevel@tonic-gateSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gateSPARC_LINTS = 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gate# 537c478bd9Sstevel@tonic-gate# 547c478bd9Sstevel@tonic-gate# 557c478bd9Sstevel@tonic-gateLINT_LIBS = $(LINT_LIB) \ 567c478bd9Sstevel@tonic-gate $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 57fb9f9b97Skupfer $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 587c478bd9Sstevel@tonic-gate $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln) 597c478bd9Sstevel@tonic-gate 60554ff184Skais# EXPORT DELETE START 61554ff184Skais# 62554ff184Skais# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*) 63554ff184Skais# They need to be listed separately since they duplicate global symbols 64554ff184Skais# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS 65554ff184Skais# should not be listed in the lint target. 66554ff184Skais# 67fb9f9b97Skupfer# Don't build this for OpenSolaris, since it will be replaced by 68fb9f9b97Skupfer# a binary that is signed by Sun RE. 69fb9f9b97Skupfer# 70fb9f9b97Skupfer$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048 71554ff184Skais# EXPORT DELETE END 72554ff184Skais 737c478bd9Sstevel@tonic-gatedef := TARGET= def 747c478bd9Sstevel@tonic-gateall := TARGET= all 757c478bd9Sstevel@tonic-gateinstall := TARGET= install 767c478bd9Sstevel@tonic-gateinstall_h := TARGET= install_h 777c478bd9Sstevel@tonic-gateclean := TARGET= clean 787c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 797c478bd9Sstevel@tonic-gatelint := TARGET= lint 807c478bd9Sstevel@tonic-gatelintlib := TARGET= lintlib 817c478bd9Sstevel@tonic-gatemodlintlib := TARGET= modlintlib 82fb9f9b97Skupfermodlist := TARGET= modlist 83fb9f9b97Skupfermodlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$ 847c478bd9Sstevel@tonic-gateclean.lint := TARGET= clean.lint 857c478bd9Sstevel@tonic-gatecheck := TARGET= check 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate.KEEP_STATE: 887c478bd9Sstevel@tonic-gate 89ae115bc7Smrj.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 90fb9f9b97Skupfer modlist modlist.sparc 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate# Override for CPU_KMODS... they cannot be built 937c478bd9Sstevel@tonic-gate# in parallel 947c478bd9Sstevel@tonic-gate.NO_PARALLEL: $(CPU_KMODS) 957c478bd9Sstevel@tonic-gate 96fb9f9b97Skupferdef all clean clobber clean.lint: genassym unix .WAIT \ 97fb9f9b97Skupfer $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) 98fb9f9b97Skupfer 99fb9f9b97Skupfer# list the modules under sun4v. 100fb9f9b97Skupfermodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 1017c478bd9Sstevel@tonic-gate $(IMPLEMENTATIONS) 1027c478bd9Sstevel@tonic-gate 103fb9f9b97Skupfer# list the modules for Install -k sun4v. 104fb9f9b97Skupfermodlist.karch: modlist modlist.sparc 105fb9f9b97Skupfer 106fb9f9b97Skupfermodlist.sparc: 107fb9f9b97Skupfer @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist 108fb9f9b97Skupfer 109fb9f9b97Skupferinstall: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \ 110fb9f9b97Skupfer $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gatelintlib: unix 1137c478bd9Sstevel@tonic-gate 114fb9f9b97Skupfermodlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS) 1157c478bd9Sstevel@tonic-gate 116fb9f9b97Skupfergenassym unix $(KMODS): FRC 117fb9f9b97Skupfer @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 118fb9f9b97Skupfer 119fb9f9b97Skupfer$(IMPLEMENTATIONS): FRC 120fb9f9b97Skupfer @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate$(XMODS): FRC 1237c478bd9Sstevel@tonic-gate @if [ -f $@/Makefile ]; then \ 124fb9f9b97Skupfer cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 1257c478bd9Sstevel@tonic-gate else \ 1267c478bd9Sstevel@tonic-gate true; \ 1277c478bd9Sstevel@tonic-gate fi 1287c478bd9Sstevel@tonic-gate 129fb9f9b97Skupfer$(CLOSED_XMODS): FRC 130fb9f9b97Skupfer @if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \ 131fb9f9b97Skupfer cd $(CLOSED)/uts/sun4v/$@; pwd; \ 132fb9f9b97Skupfer $(MAKE) $(NO_STATE) $(TARGET); \ 133fb9f9b97Skupfer else \ 134fb9f9b97Skupfer true; \ 135fb9f9b97Skupfer fi 136fb9f9b97Skupfer 137fb9f9b97Skupfer$(CLOSED_KMODS): FRC 138fb9f9b97Skupfer cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 139fb9f9b97Skupfer 1407c478bd9Sstevel@tonic-gateinstall_h check: install_platforms $(IMPLEMENTATIONS) FRC 1417c478bd9Sstevel@tonic-gate @cd sys; pwd; $(MAKE) $(TARGET) 1427c478bd9Sstevel@tonic-gate @cd vm; pwd; $(MAKE) $(TARGET) 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate# 1457c478bd9Sstevel@tonic-gate# Rules for the /platforms directories. This is hardwired here because 1467c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 1477c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 1487c478bd9Sstevel@tonic-gate# here in kernel land. 1497c478bd9Sstevel@tonic-gate# 1507c478bd9Sstevel@tonic-gate$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR) 1517c478bd9Sstevel@tonic-gate -$(INS.dir.root.sys) 1527c478bd9Sstevel@tonic-gate 153b7f45089Sdf157793$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR) 154b7f45089Sdf157793 $(INS.slink1) 155b7f45089Sdf157793 1567c478bd9Sstevel@tonic-gate# 1577c478bd9Sstevel@tonic-gate# create directories in /usr/platform/ for the implementations that are 1587c478bd9Sstevel@tonic-gate# defined in $(IMPLEMENTED_PLATFORM) 1597c478bd9Sstevel@tonic-gate# 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gate# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS) 1627c478bd9Sstevel@tonic-gate# that are linked to it. 1637c478bd9Sstevel@tonic-gate# 1647c478bd9Sstevel@tonic-gate$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR) 1657c478bd9Sstevel@tonic-gate -$(INS.dir.root.sys) 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate# 1687c478bd9Sstevel@tonic-gate# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS) 1697c478bd9Sstevel@tonic-gate# to it's corresponding $(IMPLEMENTED_PLATFORM). 1707c478bd9Sstevel@tonic-gate# 1717c478bd9Sstevel@tonic-gatePLATFORMS = $(LINKED_PLATFORMS) 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate$(USR_PLAT_DIRS): $(USR_PLAT_DIR) 1747c478bd9Sstevel@tonic-gate $(INS.slink3) 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gatePLATFORMS += $(IMPLEMENTED_PLATFORM) 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gate# 1797c478bd9Sstevel@tonic-gate# Make the /platforms directories. This is hardwired here because 1807c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 1817c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 1827c478bd9Sstevel@tonic-gate# here in kernel land. 1837c478bd9Sstevel@tonic-gate# 1847c478bd9Sstevel@tonic-gateinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 1857c478bd9Sstevel@tonic-gate $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \ 186b7f45089Sdf157793 $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \ 1877c478bd9Sstevel@tonic-gate $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \ 1889ef7884dSanovick $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR) \ 1899ef7884dSanovick $(USR_STPAUL_DIR) $(USR_STPAUL_SBIN_DIR) \ 190ecb56eb0Swillard $(USR_STPAUL_LIB_DIR) \ 191ecb56eb0Swillard $(USR_GLENDALE_DIR) $(USR_GLENDALE_SBIN_DIR) \ 192*a90d965dSfw157321 $(USR_GLENDALE_LIB_DIR) \ 193*a90d965dSfw157321 $(USR_HURON_DIR) \ 194*a90d965dSfw157321 $(USR_HURON_SBIN_DIR) $(USR_HURON_LIB_DIR) 1957c478bd9Sstevel@tonic-gate 1967c478bd9Sstevel@tonic-gate# 1977c478bd9Sstevel@tonic-gate# rules for making include, sbin, lib dirs/links in 1987c478bd9Sstevel@tonic-gate# /usr/platform/$(PLATFORM)/ for desktop platforms 1997c478bd9Sstevel@tonic-gate# 2007c478bd9Sstevel@tonic-gate$(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR) 2017c478bd9Sstevel@tonic-gate $(INS.slink4) 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR) 2047c478bd9Sstevel@tonic-gate $(INS.slink5) 2057c478bd9Sstevel@tonic-gate 206ecb56eb0Swillard$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR) 207ecb56eb0Swillard -$(INS.dir.root.bin) 208ecb56eb0Swillard 2099ef7884dSanovick$(USR_STPAUL_DIR): $(USR_SUN4V_PLAT_DIR) 2109ef7884dSanovick -$(INS.dir.root.sys) 2119ef7884dSanovick 2129ef7884dSanovick$(USR_STPAUL_SBIN_DIR): $(USR_STPAUL_DIR) 2139ef7884dSanovick $(INS.slink5) 2149ef7884dSanovick 2159ef7884dSanovick$(USR_STPAUL_LIB_DIR): $(USR_STPAUL_DIR) 2169ef7884dSanovick -$(INS.dir.root.bin) 2179ef7884dSanovick 218*a90d965dSfw157321$(USR_HURON_DIR): $(USR_SUN4V_PLAT_DIR) 219*a90d965dSfw157321 -$(INS.dir.root.sys) 220*a90d965dSfw157321 221*a90d965dSfw157321$(USR_HURON_SBIN_DIR): $(USR_HURON_DIR) 222*a90d965dSfw157321 $(INS.slink5) 223*a90d965dSfw157321 224*a90d965dSfw157321$(USR_HURON_LIB_DIR): $(USR_HURON_DIR) 225*a90d965dSfw157321 -$(INS.dir.root.bin) 226*a90d965dSfw157321 227ecb56eb0Swillard$(USR_GLENDALE_DIR): $(USR_SUN4V_PLAT_DIR) 228ecb56eb0Swillard -$(INS.dir.root.sys) 2297c478bd9Sstevel@tonic-gate 230ecb56eb0Swillard$(USR_GLENDALE_SBIN_DIR): $(USR_GLENDALE_DIR) 231ecb56eb0Swillard $(INS.slink5) 232ecb56eb0Swillard 233ecb56eb0Swillard$(USR_GLENDALE_LIB_DIR): $(USR_GLENDALE_DIR) 234ecb56eb0Swillard -$(INS.dir.root.bin) 2357c478bd9Sstevel@tonic-gate# 2367c478bd9Sstevel@tonic-gate# Full kernel lint target. 2377c478bd9Sstevel@tonic-gate# 2387c478bd9Sstevel@tonic-gateLINT_TARGET = globallint 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gategloballint: 2417c478bd9Sstevel@tonic-gate @-$(ECHO) "\nSUN4V KERNEL: global crosschecks:" 2427c478bd9Sstevel@tonic-gate @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gatelint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \ 2457c478bd9Sstevel@tonic-gate $(IMPLEMENTATIONS) 2467c478bd9Sstevel@tonic-gate 2477c478bd9Sstevel@tonic-gate# EXPORT DELETE START 2487c478bd9Sstevel@tonic-gate 2497c478bd9Sstevel@tonic-gateEXPORT_SRC: 2507c478bd9Sstevel@tonic-gate $(RM) Makefile+ 2517c478bd9Sstevel@tonic-gate sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 2527c478bd9Sstevel@tonic-gate < Makefile > Makefile+ 2537c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 2547c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile 2557c478bd9Sstevel@tonic-gate 2567c478bd9Sstevel@tonic-gate# EXPORT DELETE END 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 2597c478bd9Sstevel@tonic-gate 2607c478bd9Sstevel@tonic-gate# 2617c478bd9Sstevel@tonic-gate# Cross-reference customization: build a cross-reference over all of the 2627c478bd9Sstevel@tonic-gate# sun4v-related directories. 2637c478bd9Sstevel@tonic-gate# 264fb9f9b97SkupferSHARED_XRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common 265fb9f9b97SkupferCLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%) 266fb9f9b97SkupferXRDIRS = $(SHARED_XRDIRS) 267fb9f9b97Skupfer$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=) 268fb9f9b97Skupfer 2697c478bd9Sstevel@tonic-gateXRPRUNE = i86pc 2707c478bd9Sstevel@tonic-gate 2717c478bd9Sstevel@tonic-gatecscope.out tags: FRC 2727c478bd9Sstevel@tonic-gate $(XREF) -x $@ 273