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# uts/intel/Makefile 227c478bd9Sstevel@tonic-gate# 234bff34e3Sthurlow# Copyright 2008 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# 297c478bd9Sstevel@tonic-gate# This makefile drives the production of all implementation architecture 307c478bd9Sstevel@tonic-gate# independent modules for Intel processors. 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateUTSBASE = .. 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gateinclude Makefile.intel 357c478bd9Sstevel@tonic-gate 364bff34e3SthurlowLINT_KMODS_X1 = $(LINT_KMODS:nsmb=) 374bff34e3SthurlowLINT_KMODS_X2 = $(LINT_KMODS_X1:smbfs=) 384bff34e3SthurlowLINT_KMODLIBS = $(LINT_KMODS_X2:e1000g=) 397c478bd9Sstevel@tonic-gateLINT_LIBS = $(LINT_LIB) $(GEN_LINT_LIB) \ 4008057504Sxy150489 $(LINT_KMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 41fb9f9b97Skupfer $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate# EXPORT DELETE START 4488543b5cSkrishna$(CLOSED_BUILD)LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) 45789ff9aeSgs150176$(CLOSED_BUILD)LINT_CLOSED_XMOD4 = $(CLOSED_XMODS:bnx=) 46789ff9aeSgs150176$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(LINT_CLOSED_XMOD4:lsimega=) 4708057504Sxy150489$(CLOSED_BUILD)LINT_CLOSED_XMOD2 = $(LINT_CLOSED_XMOD3:spwr=) 4808057504Sxy150489$(CLOSED_BUILD)LINT_CLOSED_XMOD1 = $(LINT_CLOSED_XMOD2:adpu320=) 49fb9f9b97Skupfer$(CLOSED_BUILD)LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate# 527c478bd9Sstevel@tonic-gate# dprov is delivered in the SUNWcrtptoint package. 537c478bd9Sstevel@tonic-gate# 547c478bd9Sstevel@tonic-gateDRV_KMODS += dprov 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate# 577c478bd9Sstevel@tonic-gate# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*) 587c478bd9Sstevel@tonic-gate# They need to be listed separately since they duplicate global symbols 597c478bd9Sstevel@tonic-gate# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS 607c478bd9Sstevel@tonic-gate# should not be listed in the lint target. 617c478bd9Sstevel@tonic-gate# 62fb9f9b97Skupfer# Don't build these for OpenSolaris, since they will be replaced by 63fb9f9b97Skupfer# binaries that are signed by Sun RE. 64fb9f9b97Skupfer# 65fb9f9b97Skupfer$(CLOSED_BUILD)CRYPTO_EK_KMODS += aes256 66fb9f9b97Skupfer$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048 67fb9f9b97Skupfer$(CLOSED_BUILD)CRYPTO_EK_KMODS += blowfish448 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate# EXPORT DELETE END 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate# 727c478bd9Sstevel@tonic-gate# 737c478bd9Sstevel@tonic-gatedef := TARGET= def 74*98157a70Sakolbdef.prereq := TARGET= def 757c478bd9Sstevel@tonic-gateall := TARGET= all 76*98157a70Sakolball.prereq := TARGET= all 777c478bd9Sstevel@tonic-gateinstall := TARGET= install 78*98157a70Sakolbinstall.prereq := TARGET= all 797c478bd9Sstevel@tonic-gateclean := TARGET= clean 807c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 817c478bd9Sstevel@tonic-gatelint := TARGET= lint 82*98157a70Sakolblint.prereq := TARGET= lint 837c478bd9Sstevel@tonic-gatemodlintlib := TARGET= modlintlib 84fb9f9b97Skupfermodlist := TARGET= modlist 85fb9f9b97Skupfermodlist := NO_STATE= -K $$MODSTATE$$$$ 867c478bd9Sstevel@tonic-gateclean.lint := TARGET= clean.lint 877c478bd9Sstevel@tonic-gatecheck := TARGET= check 887c478bd9Sstevel@tonic-gateinstall_h := TARGET= install_h 89*98157a70Sakolbinstall_h.prereq := TARGET= install_h 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate.KEEP_STATE: 927c478bd9Sstevel@tonic-gate 93ae115bc7Smrj.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \ 94ae115bc7Smrj $(CLOSED_XMODS) config $(LINT_DEPS) 957c478bd9Sstevel@tonic-gate 969acbbeafSnn35248def all install clean clobber modlist: genassym $(KMODS) $(CLOSED_KMODS) \ 97fb9f9b97Skupfer $(SVVS) $(XMODS) $(CLOSED_XMODS) config 987c478bd9Sstevel@tonic-gate 99*98157a70Sakolb 100*98157a70Sakolb# 101*98157a70Sakolb# Privilege constants 102*98157a70Sakolb# 103*98157a70Sakolb# NOTE: The rules for generating priv_const.c file are shared between all 104*98157a70Sakolb# processor architectures and and should be kept in sync. If they are changed in 105*98157a70Sakolb# this file make sure that sparc rules are updated as well. 106*98157a70Sakolb# 107*98157a70SakolbPRIVS_C = $(SRC)/uts/common/os/priv_const.c 108*98157a70Sakolb 109*98157a70Sakolb$(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF) 110*98157a70Sakolb $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@ 111*98157a70Sakolb 112*98157a70Sakolb# 113*98157a70Sakolb# Prerequisites 114*98157a70Sakolb# 115*98157a70Sakolb# The uts/Makefile defines build parallelism for x86 platforms such that i86pc, 116*98157a70Sakolb# i86xpv and intel are all built in parallel. This requires building certain 117*98157a70Sakolb# parts before the parallel build can start. The uts/Makefile appends the 118*98157a70Sakolb# '.prereq' string to the original target and executes this Makefile to build 119*98157a70Sakolb# any prerequisites needed before the full parallel build can start. After that 120*98157a70Sakolb# make continues with normal targets. 121*98157a70Sakolb# 122*98157a70Sakolb# Any build prerequisites for x86 builds should be described here. 123*98157a70Sakolb# 124*98157a70Sakolb# genassym is used to build intel/dtrace and genunix, so it should be built 125*98157a70Sakolb# first. 126*98157a70Sakolb# 127*98157a70Sakolb# priv_const.c is required to build genunix. 128*98157a70Sakolb# 129*98157a70Sakolb# genunix is used by everyone to ctf-merge with. Genunix is CTF-merged with 130*98157a70Sakolb# intel/ip so as a side effect this dependency builds intel/ip as part of the 131*98157a70Sakolb# prerequisites. 132*98157a70Sakolb# 133*98157a70Sakolb# intel/dtrace depends on i86pc/genassym, so we need to build both 134*98157a70Sakolb# i86pc/genassym and intel/genassym. 135*98157a70Sakolb# 136*98157a70Sakolball.prereq install.prereq def.prereq: genassym genunix FRC 137*98157a70Sakolb @cd ../i86pc/genassym; pwd; $(MAKE) $(@:%.prereq=%) 138*98157a70Sakolb 139*98157a70Sakolb# 140*98157a70Sakolb# i86pc lint libraries should be built first 141*98157a70Sakolb# 142*98157a70Sakolblint.prereq: FRC 143*98157a70Sakolb @cd ../i86pc; pwd; $(MAKE) $(NO_STATE) lint 144*98157a70Sakolb 145*98157a70Sakolb# 146*98157a70Sakolb# Nothing to do for any other prerequisite targets. 147*98157a70Sakolb# 148*98157a70Sakolb%.prereq: 149*98157a70Sakolb 150*98157a70Sakolbgenunix: $(PRIVS_C) 151*98157a70Sakolb 152fb9f9b97Skupfermodlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \ 153fb9f9b97Skupfer $(XMODS) $(CLOSED_XMODS) 1547c478bd9Sstevel@tonic-gate 1559acbbeafSnn35248genassym $(KMODS) $(SUBDIRS) config: FRC 156fb9f9b97Skupfer @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 1577c478bd9Sstevel@tonic-gate 158fb9f9b97Skupfer$(CLOSED_KMODS): FRC 159fb9f9b97Skupfer cd $(CLOSED)/uts/intel/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 160fb9f9b97Skupfer 161fb9f9b97Skupfer$(XMODS): FRC 1627c478bd9Sstevel@tonic-gate @if [ -f $@/Makefile ]; then \ 163fb9f9b97Skupfer cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 164fb9f9b97Skupfer else \ 165fb9f9b97Skupfer true; \ 166fb9f9b97Skupfer fi 167fb9f9b97Skupfer 168fb9f9b97Skupfer$(SVVS) $(CLOSED_XMODS): FRC 169fb9f9b97Skupfer @if [ -f $(CLOSED)/uts/intel/$@/Makefile ]; then \ 170fb9f9b97Skupfer cd $(CLOSED)/uts/intel/$@; pwd; \ 171fb9f9b97Skupfer $(MAKE) $(NO_STATE) $(TARGET); \ 1727c478bd9Sstevel@tonic-gate else \ 1737c478bd9Sstevel@tonic-gate true; \ 1747c478bd9Sstevel@tonic-gate fi 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gateinstall_h check: FRC 1777c478bd9Sstevel@tonic-gate @cd sys; pwd; $(MAKE) $(TARGET) 1787c478bd9Sstevel@tonic-gate @cd asm; pwd; $(MAKE) $(TARGET) 1797c478bd9Sstevel@tonic-gate @cd ia32/sys; pwd; $(MAKE) $(TARGET) 1807c478bd9Sstevel@tonic-gate @cd amd64/sys; pwd; $(MAKE) $(TARGET) 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate# 183ae115bc7Smrj# Work-around to disable acpica global crosscheck lint warnings 184ae115bc7Smrj# 185ae115bc7SmrjLGREP.intel = grep -v 'intel/io/acpica' 186ae115bc7Smrj 187ae115bc7Smrj# 1887c478bd9Sstevel@tonic-gate# Full kernel lint target. 1897c478bd9Sstevel@tonic-gate# 1907c478bd9Sstevel@tonic-gateLINT_TARGET = globallint 1917c478bd9Sstevel@tonic-gate 192ae115bc7Smrj# workaround for multiply defined errors 193ae115bc7Smrjgloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 194ae115bc7Smrj 1957c478bd9Sstevel@tonic-gategloballint: 196*98157a70Sakolb @pwd 1977c478bd9Sstevel@tonic-gate @-$(ECHO) "\nFULL KERNEL: global crosschecks:" 1986e541dddSmrj @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.intel) | $(LGREP.2) 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gatelint: modlintlib .WAIT $(LINT_DEPS) 2017c478bd9Sstevel@tonic-gate 2027c478bd9Sstevel@tonic-gate# EXPORT DELETE START 2037c478bd9Sstevel@tonic-gate 2047c478bd9Sstevel@tonic-gateEXPORT_SRC: 2057c478bd9Sstevel@tonic-gate $(RM) Makefile+ 2067c478bd9Sstevel@tonic-gate sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 2077c478bd9Sstevel@tonic-gate < Makefile > Makefile+ 2087c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 2097c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile 2107c478bd9Sstevel@tonic-gate 2117c478bd9Sstevel@tonic-gate# EXPORT DELETE END 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 214