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 588543b5cSkrishna# Common Development and Distribution License (the "License"). 688543b5cSkrishna# 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# 227adfacf3Sml29623# Copyright 2008 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 i86pc architecture. 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateUTSBASE = .. 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateinclude Makefile.i86pc 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate# 347c478bd9Sstevel@tonic-gate# The following are x86 specific (rather than i86pc) specific modules 357c478bd9Sstevel@tonic-gate# which are required for the i86pc kernel to completely lint. They are 367c478bd9Sstevel@tonic-gate# not involved in the build in any other way. In order to minimize 377c478bd9Sstevel@tonic-gate# build time, it is assumed that they are up to date. 387c478bd9Sstevel@tonic-gate# 397c478bd9Sstevel@tonic-gateINTEL_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR) 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateINTEL_LINTS = genunix 427c478bd9Sstevel@tonic-gate 43*b6805bf7SGordon RossLINT_LIBS = \ 44ae115bc7Smrj $(GENUNIX_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 457adfacf3Sml29623 $(PARALLEL_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 46fb9f9b97Skupfer $(CLOSED_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 477c478bd9Sstevel@tonic-gate $(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln) 487c478bd9Sstevel@tonic-gate 49*b6805bf7SGordon RossI86PC_LINTS = dr drmach_acpi 50*b6805bf7SGordon Ross 517c478bd9Sstevel@tonic-gate# 527c478bd9Sstevel@tonic-gate# 537c478bd9Sstevel@tonic-gate# 547c478bd9Sstevel@tonic-gatedef := TARGET= def 557c478bd9Sstevel@tonic-gateall := TARGET= all 567c478bd9Sstevel@tonic-gateinstall := TARGET= install 57a546187aSedpinstall_h := TARGET= install_h 587c478bd9Sstevel@tonic-gateclean := TARGET= clean 597c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 607c478bd9Sstevel@tonic-gatelint := TARGET= lint 617c478bd9Sstevel@tonic-gatelintlib := TARGET= lintlib 627c478bd9Sstevel@tonic-gatemachmodlintlib := TARGET= modlintlib 63fb9f9b97Skupfermodlist := TARGET= modlist 64fb9f9b97Skupfermodlist modlist.intel := NO_STATE= -K $$MODSTATE$$$$ 657c478bd9Sstevel@tonic-gateclean.lint := TARGET= clean.lint 667c478bd9Sstevel@tonic-gatecheck := TARGET= check 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate.KEEP_STATE: 697c478bd9Sstevel@tonic-gate 70ae115bc7Smrj.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 71fb9f9b97Skupfer modlist modlist.intel 727c478bd9Sstevel@tonic-gate 737aec1d6eScindiINITIAL_TARGETS = \ 747aec1d6eScindi genassym \ 757aec1d6eScindi unix \ 767aec1d6eScindi cpu/scripts 777aec1d6eScindi 787aec1d6eScindidef all clean clobber clean.lint: setup genassym unix .WAIT \ 79eb0cc229Sedp $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) 807c478bd9Sstevel@tonic-gate 817aec1d6eScindiinstall: install_platforms setup genassym unix .WAIT \ 82eb0cc229Sedp $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) 83fb9f9b97Skupfer 84*b6805bf7SGordon Ross# Need to clean in here too because of lint. 85*b6805bf7SGordon Rossclean: $(I86PC_LINTS) 86*b6805bf7SGordon Ross 87fb9f9b97Skupfer# list the modules under i86pc. 88eb0cc229Sedpmodlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ 89eb0cc229Sedp $(IMPLEMENTATIONS) 90fb9f9b97Skupfer 91fb9f9b97Skupfer# list the modules for Install -k i86pc. 92fb9f9b97Skupfermodlist.karch: modlist modlist.intel 93fb9f9b97Skupfer 94fb9f9b97Skupfermodlist.intel: 95fb9f9b97Skupfer @cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gatelintlib: unix 987c478bd9Sstevel@tonic-gate 99fb9f9b97Skupfermodlintlib: $(KMODS) $(CLOSED_KMODS) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gategenassym unix $(KMODS): FRC 102fb9f9b97Skupfer @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 1037c478bd9Sstevel@tonic-gate 1047aec1d6eScindisetup: FRC 1054156fc34Sgavinm @cd cpu/scripts; pwd; $(MAKE) $(TARGET) 1067aec1d6eScindi 107eb0cc229Sedp$(IMPLEMENTATIONS): FRC 108eb0cc229Sedp @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET) 109eb0cc229Sedp 1107c478bd9Sstevel@tonic-gate$(XMODS): FRC 1117c478bd9Sstevel@tonic-gate @if [ -f $@/Makefile ]; then \ 112fb9f9b97Skupfer cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 113fb9f9b97Skupfer else \ 114fb9f9b97Skupfer true; \ 115fb9f9b97Skupfer fi 116fb9f9b97Skupfer 117fb9f9b97Skupfer$(CLOSED_KMODS): FRC 118fb9f9b97Skupfer cd $(CLOSED)/uts/i86pc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 119fb9f9b97Skupfer 120fb9f9b97Skupfer$(CLOSED_XMODS): FRC 121fb9f9b97Skupfer @if [ -f $(CLOSED)/uts/i86pc/$@/Makefile ]; then \ 122fb9f9b97Skupfer cd $(CLOSED)/uts/i86pc/$@; pwd; \ 123fb9f9b97Skupfer $(MAKE) $(NO_STATE) $(TARGET); \ 1247c478bd9Sstevel@tonic-gate else \ 1257c478bd9Sstevel@tonic-gate true; \ 1267c478bd9Sstevel@tonic-gate fi 1277c478bd9Sstevel@tonic-gate 128eb0cc229Sedpinstall_h check: $(IMPLEMENTATIONS) FRC 1297c478bd9Sstevel@tonic-gate @cd sys; pwd; $(MAKE) $(TARGET) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate# 1327c478bd9Sstevel@tonic-gate# Definitions for the /platform directory aliases. 1337c478bd9Sstevel@tonic-gate# Currently none for i86pc. 1347c478bd9Sstevel@tonic-gate# 1357c478bd9Sstevel@tonic-gatePLAT_LINKS = 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate# 1387c478bd9Sstevel@tonic-gate# Make the /platform directories. This is hardwired here because 1397c478bd9Sstevel@tonic-gate# the first stage of the project (KBI) only implements the userland 1407c478bd9Sstevel@tonic-gate# changes, but the only reasonable place to record the aliases is 1417c478bd9Sstevel@tonic-gate# here in kernel land. 1427c478bd9Sstevel@tonic-gate# 1437c478bd9Sstevel@tonic-gateinstall_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 1447c478bd9Sstevel@tonic-gate $(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \ 1457c478bd9Sstevel@tonic-gate $(OEM_USR_PLAT_LINKS) 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate# 1487c478bd9Sstevel@tonic-gate# Full kernel lint target. 1497c478bd9Sstevel@tonic-gate# 1507c478bd9Sstevel@tonic-gateLINT_TARGET = globallint 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate# workaround for multiply defined errors 1537c478bd9Sstevel@tonic-gategloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gategloballint: 1567c478bd9Sstevel@tonic-gate @-$(ECHO) "\nFULL KERNEL: global crosschecks:" 157*b6805bf7SGordon Ross @-$(LINT) $(LINTFLAGS) $(LINT_LIB) $(LINT_LIBS) 2>&1 | $(LGREP.2) 1587c478bd9Sstevel@tonic-gate 159eb0cc229Sedplint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS) \ 160eb0cc229Sedp $(IMPLEMENTATIONS) 1617c478bd9Sstevel@tonic-gate 1627c478bd9Sstevel@tonic-gate$(INTEL_LINTS): FRC 1637c478bd9Sstevel@tonic-gate @cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib 1647c478bd9Sstevel@tonic-gate 1657c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate# 1687c478bd9Sstevel@tonic-gate# Cross-reference customization: build a cross-reference over all of the 1697c478bd9Sstevel@tonic-gate# i86pc-related directories. 1707c478bd9Sstevel@tonic-gate# 1719b3a7842SCheng Sean YeXRDIRS = ../i86pc ../intel ../common 1729b3a7842SCheng Sean Ye$(CLOSED_BUILD)XRDIRS += ../../../closed/uts/intel ../../../closed/uts/common 1739b3a7842SCheng Sean Ye 1747c478bd9Sstevel@tonic-gateXRPRUNE = sun4u sun4 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gatecscope.out tags: FRC 1777c478bd9Sstevel@tonic-gate $(XREF) -x $@ 178