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 57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate# with the License. 87c478bd9Sstevel@tonic-gate# 97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate# and limitations under the License. 137c478bd9Sstevel@tonic-gate# 147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate# 207c478bd9Sstevel@tonic-gate# CDDL HEADER END 217c478bd9Sstevel@tonic-gate# 227c478bd9Sstevel@tonic-gate# 23*7aec1d6eScindi# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate# This makefile drives the production of all implementation architecture 297c478bd9Sstevel@tonic-gate# dependent modules for the i86pc architecture. 307c478bd9Sstevel@tonic-gate# 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateUTSBASE = .. 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gateinclude Makefile.i86pc 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate# 377c478bd9Sstevel@tonic-gate# The following are x86 specific (rather than i86pc) specific modules 387c478bd9Sstevel@tonic-gate# which are required for the i86pc kernel to completely lint. They are 397c478bd9Sstevel@tonic-gate# not involved in the build in any other way. In order to minimize 407c478bd9Sstevel@tonic-gate# build time, it is assumed that they are up to date. 417c478bd9Sstevel@tonic-gate# 427c478bd9Sstevel@tonic-gateINTEL_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR) 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateINTEL_LINTS = genunix 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gateLINT_LIBS = $(LINT_LIB) \ 477c478bd9Sstevel@tonic-gate $(KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 48fb9f9b97Skupfer $(CLOSED_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 497c478bd9Sstevel@tonic-gate $(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln) 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate# 527c478bd9Sstevel@tonic-gate# 537c478bd9Sstevel@tonic-gate# 547c478bd9Sstevel@tonic-gatedef := TARGET= def 557c478bd9Sstevel@tonic-gateall := TARGET= all 567c478bd9Sstevel@tonic-gateinstall := TARGET= install 577c478bd9Sstevel@tonic-gateclean := TARGET= clean 587c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 597c478bd9Sstevel@tonic-gatelint := TARGET= lint 607c478bd9Sstevel@tonic-gatelintlib := TARGET= lintlib 617c478bd9Sstevel@tonic-gatemachmodlintlib := TARGET= modlintlib 62fb9f9b97Skupfermodlist := TARGET= modlist 63fb9f9b97Skupfermodlist modlist.intel := NO_STATE= -K $$MODSTATE$$$$ 647c478bd9Sstevel@tonic-gateclean.lint := TARGET= clean.lint 657c478bd9Sstevel@tonic-gatecheck := TARGET= check 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate.KEEP_STATE: 687c478bd9Sstevel@tonic-gate 69fb9f9b97Skupfer.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 70fb9f9b97Skupfer modlist modlist.intel 717c478bd9Sstevel@tonic-gate 72*7aec1d6eScindiINITIAL_TARGETS = \ 73*7aec1d6eScindi genassym \ 74*7aec1d6eScindi unix \ 75*7aec1d6eScindi cpu/scripts 76*7aec1d6eScindi 77*7aec1d6eScindidef all clean clobber clean.lint: setup genassym unix .WAIT \ 78fb9f9b97Skupfer $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 797c478bd9Sstevel@tonic-gate 80*7aec1d6eScindiinstall: install_platforms setup genassym unix .WAIT \ 81*7aec1d6eScindi $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 82fb9f9b97Skupfer 83fb9f9b97Skupfer# list the modules under i86pc. 84fb9f9b97Skupfermodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) 85fb9f9b97Skupfer 86fb9f9b97Skupfer# list the modules for Install -k i86pc. 87fb9f9b97Skupfermodlist.karch: modlist modlist.intel 88fb9f9b97Skupfer 89fb9f9b97Skupfermodlist.intel: 90fb9f9b97Skupfer @cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gatelintlib: unix 937c478bd9Sstevel@tonic-gate 94fb9f9b97Skupfermodlintlib: $(KMODS) $(CLOSED_KMODS) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gategenassym unix $(KMODS): FRC 97fb9f9b97Skupfer @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 987c478bd9Sstevel@tonic-gate 99*7aec1d6eScindisetup: FRC 100*7aec1d6eScindi @cd cpu/scripts; pwd; $(MAKE) setup 101*7aec1d6eScindi 1027c478bd9Sstevel@tonic-gate$(XMODS): FRC 1037c478bd9Sstevel@tonic-gate @if [ -f $@/Makefile ]; then \ 104fb9f9b97Skupfer cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 105fb9f9b97Skupfer else \ 106fb9f9b97Skupfer true; \ 107fb9f9b97Skupfer fi 108fb9f9b97Skupfer 109fb9f9b97Skupfer$(CLOSED_KMODS): FRC 110fb9f9b97Skupfer cd $(CLOSED)/uts/i86pc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 111fb9f9b97Skupfer 112fb9f9b97Skupfer$(CLOSED_XMODS): FRC 113fb9f9b97Skupfer @if [ -f $(CLOSED)/uts/i86pc/$@/Makefile ]; then \ 114fb9f9b97Skupfer cd $(CLOSED)/uts/i86pc/$@; pwd; \ 115fb9f9b97Skupfer $(MAKE) $(NO_STATE) $(TARGET); \ 1167c478bd9Sstevel@tonic-gate else \ 1177c478bd9Sstevel@tonic-gate true; \ 1187c478bd9Sstevel@tonic-gate fi 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gateinstall_h check: FRC 1217c478bd9Sstevel@tonic-gate @cd sys; pwd; $(MAKE) $(TARGET) 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate# 1247c478bd9Sstevel@tonic-gate# For some x86 OEMs that deliver their own platform kernel modules but 1257c478bd9Sstevel@tonic-gate# will not deliver anything in usr/platform, they should add their platforms 1267c478bd9Sstevel@tonic-gate# here so a symlink will be created to the standard usr/platform/i86pc. 1277c478bd9Sstevel@tonic-gate# 1287c478bd9Sstevel@tonic-gateOEM_LINKS = ncri86pc 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gateOEM_USR_PLAT_LINKS = $(OEM_LINKS:%=$(USR_PLAT_DIR)/%) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate$(OEM_USR_PLAT_LINKS): 1337c478bd9Sstevel@tonic-gate $(INS.slink1) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate# 1367c478bd9Sstevel@tonic-gate# Definitions for the /platform directory aliases. 1377c478bd9Sstevel@tonic-gate# Currently none for i86pc. 1387c478bd9Sstevel@tonic-gate# 1397c478bd9Sstevel@tonic-gatePLAT_LINKS = 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate# 1427c478bd9Sstevel@tonic-gate# Make the /platform directories. This is hardwired here because 1437c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 1447c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 1457c478bd9Sstevel@tonic-gate# here in kernel land. 1467c478bd9Sstevel@tonic-gate# 1477c478bd9Sstevel@tonic-gateinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 1487c478bd9Sstevel@tonic-gate $(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \ 1497c478bd9Sstevel@tonic-gate $(OEM_USR_PLAT_LINKS) 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gate# 1527c478bd9Sstevel@tonic-gate# Work-around to disable acpica global crosscheck lint warnings 1537c478bd9Sstevel@tonic-gate# 1547c478bd9Sstevel@tonic-gateLGREP.i86pc = grep -v 'i86pc/io/acpica' 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate# 1577c478bd9Sstevel@tonic-gate# Full kernel lint target. 1587c478bd9Sstevel@tonic-gate# 1597c478bd9Sstevel@tonic-gateLINT_TARGET = globallint 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gate# workaround for multiply defined errors 1627c478bd9Sstevel@tonic-gategloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gategloballint: 1657c478bd9Sstevel@tonic-gate @-$(ECHO) "\nFULL KERNEL: global crosschecks:" 1667c478bd9Sstevel@tonic-gate @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) | $(LGREP.i86pc) 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gatelint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS) 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gate$(INTEL_LINTS): FRC 1717c478bd9Sstevel@tonic-gate @cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gateFRC: 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate# 1787c478bd9Sstevel@tonic-gate# Cross-reference customization: build a cross-reference over all of the 1797c478bd9Sstevel@tonic-gate# i86pc-related directories. 1807c478bd9Sstevel@tonic-gate# 181fb9f9b97SkupferSHARED_XRDIRS = ../i86pc ../intel ../common 182fb9f9b97SkupferXRDIRS = $(SHARED_XRDIRS) 183fb9f9b97Skupfer$(CLOSED_BUILD)XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%) 1847c478bd9Sstevel@tonic-gateXRPRUNE = sun4u sun4 1857c478bd9Sstevel@tonic-gate 1867c478bd9Sstevel@tonic-gatecscope.out tags: FRC 1877c478bd9Sstevel@tonic-gate $(XREF) -x $@ 188