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# 2267b33ca4SValerie Bubb Fenwick# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# This makefile drives the production of all implementation architecture 267c478bd9Sstevel@tonic-gate# dependent modules for the sun4v architecture. 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateUTSBASE = .. 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateinclude Makefile.sun4v 329ef7884dSanovickinclude Makefile.stpaul 33a90d965dSfw157321include Makefile.huron 3459ac0c16Sdavemqinclude Makefile.maramba 35ca6d7ba9Sjl139090include Makefile.thunder 36c40d696fSwillardinclude Makefile.turgo 378696d418Sky115808include Makefile.congo 38bbdcea1aSmcwalterinclude Makefile.monza 3959ac0c16Sdavemq 40ecb56eb0SwillardUSR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320 41ecb56eb0SwillardUSR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin 42ecb56eb0SwillardUSR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib 43ecb56eb0Swillard 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate# 467c478bd9Sstevel@tonic-gate# The following are SPARC specific (rather than sun4v) specific modules 477c478bd9Sstevel@tonic-gate# which are required for the sun4v kernel to completely lint. They are 487c478bd9Sstevel@tonic-gate# not involved in the build in any other way. In order to minimize 497c478bd9Sstevel@tonic-gate# build time, it is assumed that they are up to date. But since sun4v 507c478bd9Sstevel@tonic-gate# is really a separate architecture we cannot use the v7 sparc modules. 517c478bd9Sstevel@tonic-gate# 527c478bd9Sstevel@tonic-gateSPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateSPARC_LINTS = 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate# 577c478bd9Sstevel@tonic-gate# 587c478bd9Sstevel@tonic-gate# 597c478bd9Sstevel@tonic-gateLINT_LIBS = $(LINT_LIB) \ 607c478bd9Sstevel@tonic-gate $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 61fb9f9b97Skupfer $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 627c478bd9Sstevel@tonic-gate $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln) 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gatedef := TARGET= def 657c478bd9Sstevel@tonic-gateall := TARGET= all 667c478bd9Sstevel@tonic-gateinstall := TARGET= install 677c478bd9Sstevel@tonic-gateinstall_h := TARGET= install_h 687c478bd9Sstevel@tonic-gateclean := TARGET= clean 697c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 707c478bd9Sstevel@tonic-gatelint := TARGET= lint 717c478bd9Sstevel@tonic-gatelintlib := TARGET= lintlib 727c478bd9Sstevel@tonic-gatemodlintlib := TARGET= modlintlib 73fb9f9b97Skupfermodlist := TARGET= modlist 74fb9f9b97Skupfermodlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$ 757c478bd9Sstevel@tonic-gateclean.lint := TARGET= clean.lint 767c478bd9Sstevel@tonic-gatecheck := TARGET= check 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate.KEEP_STATE: 797c478bd9Sstevel@tonic-gate 80ae115bc7Smrj.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 81fb9f9b97Skupfer modlist modlist.sparc 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate# Override for CPU_KMODS... they cannot be built 847c478bd9Sstevel@tonic-gate# in parallel 857c478bd9Sstevel@tonic-gate.NO_PARALLEL: $(CPU_KMODS) 867c478bd9Sstevel@tonic-gate 87fb9f9b97Skupferdef all clean clobber clean.lint: genassym unix .WAIT \ 88fb9f9b97Skupfer $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) 89fb9f9b97Skupfer 90fb9f9b97Skupfer# list the modules under sun4v. 91fb9f9b97Skupfermodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 927c478bd9Sstevel@tonic-gate $(IMPLEMENTATIONS) 937c478bd9Sstevel@tonic-gate 94fb9f9b97Skupfer# list the modules for Install -k sun4v. 95fb9f9b97Skupfermodlist.karch: modlist modlist.sparc 96fb9f9b97Skupfer 97fb9f9b97Skupfermodlist.sparc: 98fb9f9b97Skupfer @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist 99fb9f9b97Skupfer 100fb9f9b97Skupferinstall: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \ 101fb9f9b97Skupfer $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gatelintlib: unix 1047c478bd9Sstevel@tonic-gate 105fb9f9b97Skupfermodlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS) 1067c478bd9Sstevel@tonic-gate 107fb9f9b97Skupfergenassym unix $(KMODS): FRC 108fb9f9b97Skupfer @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 109fb9f9b97Skupfer 110fb9f9b97Skupfer$(IMPLEMENTATIONS): FRC 111fb9f9b97Skupfer @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET) 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate$(XMODS): FRC 1147c478bd9Sstevel@tonic-gate @if [ -f $@/Makefile ]; then \ 115fb9f9b97Skupfer cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 1167c478bd9Sstevel@tonic-gate else \ 1177c478bd9Sstevel@tonic-gate true; \ 1187c478bd9Sstevel@tonic-gate fi 1197c478bd9Sstevel@tonic-gate 120fb9f9b97Skupfer$(CLOSED_XMODS): FRC 121fb9f9b97Skupfer @if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \ 122fb9f9b97Skupfer cd $(CLOSED)/uts/sun4v/$@; pwd; \ 123fb9f9b97Skupfer $(MAKE) $(NO_STATE) $(TARGET); \ 124fb9f9b97Skupfer else \ 125fb9f9b97Skupfer true; \ 126fb9f9b97Skupfer fi 127fb9f9b97Skupfer 128fb9f9b97Skupfer$(CLOSED_KMODS): FRC 129fb9f9b97Skupfer cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 130fb9f9b97Skupfer 1317c478bd9Sstevel@tonic-gateinstall_h check: install_platforms $(IMPLEMENTATIONS) FRC 1327c478bd9Sstevel@tonic-gate @cd sys; pwd; $(MAKE) $(TARGET) 1337c478bd9Sstevel@tonic-gate @cd vm; pwd; $(MAKE) $(TARGET) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate# 1367c478bd9Sstevel@tonic-gate# Rules for the /platforms directories. This is hardwired here because 1377c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 1387c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 1397c478bd9Sstevel@tonic-gate# here in kernel land. 1407c478bd9Sstevel@tonic-gate# 1417c478bd9Sstevel@tonic-gate$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR) 14248bc00d6Sjmcp -$(INS.dir) 1437c478bd9Sstevel@tonic-gate 144b7f45089Sdf157793$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR) 145b7f45089Sdf157793 $(INS.slink1) 146b7f45089Sdf157793 1477c478bd9Sstevel@tonic-gate# 1487c478bd9Sstevel@tonic-gate# create directories in /usr/platform/ for the implementations that are 1497c478bd9Sstevel@tonic-gate# defined in $(IMPLEMENTED_PLATFORM) 1507c478bd9Sstevel@tonic-gate# 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS) 1537c478bd9Sstevel@tonic-gate# that are linked to it. 1547c478bd9Sstevel@tonic-gate# 1557c478bd9Sstevel@tonic-gate$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR) 15648bc00d6Sjmcp -$(INS.dir) 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate# 1597c478bd9Sstevel@tonic-gate# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS) 1607c478bd9Sstevel@tonic-gate# to it's corresponding $(IMPLEMENTED_PLATFORM). 1617c478bd9Sstevel@tonic-gate# 1627c478bd9Sstevel@tonic-gatePLATFORMS = $(LINKED_PLATFORMS) 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate$(USR_PLAT_DIRS): $(USR_PLAT_DIR) 1657c478bd9Sstevel@tonic-gate $(INS.slink3) 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gatePLATFORMS += $(IMPLEMENTED_PLATFORM) 1687c478bd9Sstevel@tonic-gate 16959ac0c16Sdavemq 1707c478bd9Sstevel@tonic-gate# 1717c478bd9Sstevel@tonic-gate# Make the /platforms directories. This is hardwired here because 1727c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 1737c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 1747c478bd9Sstevel@tonic-gate# here in kernel land. 1757c478bd9Sstevel@tonic-gate# 17659ac0c16Sdavemq 1777c478bd9Sstevel@tonic-gateinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 1787c478bd9Sstevel@tonic-gate $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \ 179b7f45089Sdf157793 $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \ 1807c478bd9Sstevel@tonic-gate $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \ 1819ef7884dSanovick $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR) \ 1829ef7884dSanovick $(USR_STPAUL_DIR) $(USR_STPAUL_SBIN_DIR) \ 183ecb56eb0Swillard $(USR_STPAUL_LIB_DIR) \ 184ecb56eb0Swillard $(USR_GLENDALE_DIR) $(USR_GLENDALE_SBIN_DIR) \ 185a90d965dSfw157321 $(USR_GLENDALE_LIB_DIR) \ 186a90d965dSfw157321 $(USR_HURON_DIR) \ 18759ac0c16Sdavemq $(USR_HURON_SBIN_DIR) $(USR_HURON_LIB_DIR) \ 18859ac0c16Sdavemq $(USR_MARAMBA_DIR) $(USR_MARAMBA_SBIN_DIR) \ 189c40d696fSwillard $(USR_MARAMBA_LIB_DIR) \ 190ca6d7ba9Sjl139090 $(USR_THUNDER_DIR) $(USR_THUNDER_SBIN_DIR) \ 191ca6d7ba9Sjl139090 $(USR_THUNDER_LIB_DIR) \ 192c40d696fSwillard $(USR_TURGO_DIR) $(USR_TURGO_SBIN_DIR) \ 1938696d418Sky115808 $(USR_TURGO_LIB_DIR) \ 1948696d418Sky115808 $(USR_CONGO_DIR) $(USR_CONGO_SBIN_DIR) \ 195bbdcea1aSmcwalter $(USR_CONGO_LIB_DIR) \ 196bbdcea1aSmcwalter $(USR_MONZA_DIR) \ 19735551854SVivek Gavaskar $(USR_MONZA_SBIN_DIR) $(USR_MONZA_SBIN_LINKS) 19859ac0c16Sdavemq 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate# 2017c478bd9Sstevel@tonic-gate# rules for making include, sbin, lib dirs/links in 2027c478bd9Sstevel@tonic-gate# /usr/platform/$(PLATFORM)/ for desktop platforms 2037c478bd9Sstevel@tonic-gate# 2047c478bd9Sstevel@tonic-gate$(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR) 2057c478bd9Sstevel@tonic-gate $(INS.slink4) 2067c478bd9Sstevel@tonic-gate 2077c478bd9Sstevel@tonic-gate$(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR) 2087c478bd9Sstevel@tonic-gate $(INS.slink5) 2097c478bd9Sstevel@tonic-gate 210ecb56eb0Swillard$(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR) 21148bc00d6Sjmcp -$(INS.dir) 212ecb56eb0Swillard 2139ef7884dSanovick$(USR_STPAUL_DIR): $(USR_SUN4V_PLAT_DIR) 21448bc00d6Sjmcp -$(INS.dir) 2159ef7884dSanovick 2169ef7884dSanovick$(USR_STPAUL_SBIN_DIR): $(USR_STPAUL_DIR) 2179ef7884dSanovick $(INS.slink5) 2189ef7884dSanovick 2199ef7884dSanovick$(USR_STPAUL_LIB_DIR): $(USR_STPAUL_DIR) 22048bc00d6Sjmcp -$(INS.dir) 2219ef7884dSanovick 222a90d965dSfw157321$(USR_HURON_DIR): $(USR_SUN4V_PLAT_DIR) 22348bc00d6Sjmcp -$(INS.dir) 224a90d965dSfw157321 225a90d965dSfw157321$(USR_HURON_SBIN_DIR): $(USR_HURON_DIR) 226a90d965dSfw157321 $(INS.slink5) 227a90d965dSfw157321 228a90d965dSfw157321$(USR_HURON_LIB_DIR): $(USR_HURON_DIR) 22948bc00d6Sjmcp -$(INS.dir) 230a90d965dSfw157321 231ecb56eb0Swillard$(USR_GLENDALE_DIR): $(USR_SUN4V_PLAT_DIR) 23248bc00d6Sjmcp -$(INS.dir) 2337c478bd9Sstevel@tonic-gate 234ecb56eb0Swillard$(USR_GLENDALE_SBIN_DIR): $(USR_GLENDALE_DIR) 235ecb56eb0Swillard $(INS.slink5) 236ecb56eb0Swillard 237ecb56eb0Swillard$(USR_GLENDALE_LIB_DIR): $(USR_GLENDALE_DIR) 23848bc00d6Sjmcp -$(INS.dir) 23959ac0c16Sdavemq 24059ac0c16Sdavemq$(USR_MARAMBA_DIR): $(USR_SUN4V_PLAT_DIR) 24148bc00d6Sjmcp -$(INS.dir) 24259ac0c16Sdavemq 24359ac0c16Sdavemq$(USR_MARAMBA_SBIN_DIR): $(USR_MARAMBA_DIR) 24459ac0c16Sdavemq $(INS.slink5) 24559ac0c16Sdavemq 24659ac0c16Sdavemq$(USR_MARAMBA_LIB_DIR): $(USR_MARAMBA_DIR) 24748bc00d6Sjmcp -$(INS.dir) 24859ac0c16Sdavemq 249ca6d7ba9Sjl139090$(USR_THUNDER_DIR): $(USR_SUN4V_PLAT_DIR) 25048bc00d6Sjmcp -$(INS.dir) 251ca6d7ba9Sjl139090 252ca6d7ba9Sjl139090$(USR_THUNDER_SBIN_DIR): $(USR_THUNDER_DIR) 253ca6d7ba9Sjl139090 $(INS.slink5) 254ca6d7ba9Sjl139090 255ca6d7ba9Sjl139090$(USR_THUNDER_LIB_DIR): $(USR_THUNDER_DIR) 25648bc00d6Sjmcp -$(INS.dir) 257ca6d7ba9Sjl139090 258c40d696fSwillard$(USR_TURGO_DIR): $(USR_SUN4V_PLAT_DIR) 25948bc00d6Sjmcp -$(INS.dir) 260c40d696fSwillard 261c40d696fSwillard$(USR_TURGO_SBIN_DIR): $(USR_TURGO_DIR) 262c40d696fSwillard $(INS.slink5) 263c40d696fSwillard 264c40d696fSwillard$(USR_TURGO_LIB_DIR): $(USR_TURGO_DIR) 26548bc00d6Sjmcp -$(INS.dir) 266c40d696fSwillard 2678696d418Sky115808$(USR_CONGO_DIR): $(USR_SUN4V_PLAT_DIR) 26848bc00d6Sjmcp -$(INS.dir) 2698696d418Sky115808 2708696d418Sky115808$(USR_CONGO_SBIN_DIR): $(USR_CONGO_DIR) 2718696d418Sky115808 $(INS.slink5) 2728696d418Sky115808 2738696d418Sky115808$(USR_CONGO_LIB_DIR): $(USR_CONGO_DIR) 27448bc00d6Sjmcp -$(INS.dir) 2758696d418Sky115808 276bbdcea1aSmcwalter$(USR_MONZA_DIR): $(USR_SUN4V_PLAT_DIR) 27748bc00d6Sjmcp -$(INS.dir) 278bbdcea1aSmcwalter 279bbdcea1aSmcwalter$(USR_MONZA_SBIN_DIR): $(USR_MONZA_DIR) 28048bc00d6Sjmcp -$(INS.dir) 281bbdcea1aSmcwalter 282bbdcea1aSmcwalter$(USR_MONZA_SBIN_LINKS): $(USR_MONZA_SBIN_DIR) 283bbdcea1aSmcwalter $(INS.slink7) 284bbdcea1aSmcwalter 2857c478bd9Sstevel@tonic-gate# 2867c478bd9Sstevel@tonic-gate# Full kernel lint target. 2877c478bd9Sstevel@tonic-gate# 2887c478bd9Sstevel@tonic-gateLINT_TARGET = globallint 2897c478bd9Sstevel@tonic-gate 2907c478bd9Sstevel@tonic-gategloballint: 2917c478bd9Sstevel@tonic-gate @-$(ECHO) "\nSUN4V KERNEL: global crosschecks:" 2927c478bd9Sstevel@tonic-gate @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) 2937c478bd9Sstevel@tonic-gate 2947c478bd9Sstevel@tonic-gatelint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \ 2952f0fcb93SJason Beloro $(IMPLEMENTATIONS) $(LINT_CPU_KMODS) 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 2987c478bd9Sstevel@tonic-gate 2997c478bd9Sstevel@tonic-gate# 3007c478bd9Sstevel@tonic-gate# Cross-reference customization: build a cross-reference over all of the 3017c478bd9Sstevel@tonic-gate# sun4v-related directories. 3027c478bd9Sstevel@tonic-gate# 303*c0e7977aSJosef 'Jeff' SipekXRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common 30449126f4eSjb145095XRPRUNE = i86pc sun4u intel 3057c478bd9Sstevel@tonic-gate 3067c478bd9Sstevel@tonic-gatecscope.out tags: FRC 3077c478bd9Sstevel@tonic-gate $(XREF) -x $@ 308