10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 52228Skrishna# Common Development and Distribution License (the "License"). 62228Skrishna# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# uts/intel/Makefile 220Sstevel@tonic-gate# 2312448Sgdamore@opensolaris.org# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate# This makefile drives the production of all implementation architecture 260Sstevel@tonic-gate# independent modules for Intel processors. 270Sstevel@tonic-gate 280Sstevel@tonic-gateUTSBASE = .. 290Sstevel@tonic-gate 300Sstevel@tonic-gateinclude Makefile.intel 310Sstevel@tonic-gate 326007SthurlowLINT_KMODS_X1 = $(LINT_KMODS:nsmb=) 336007SthurlowLINT_KMODS_X2 = $(LINT_KMODS_X1:smbfs=) 346007SthurlowLINT_KMODLIBS = $(LINT_KMODS_X2:e1000g=) 350Sstevel@tonic-gateLINT_LIBS = $(LINT_LIB) $(GEN_LINT_LIB) \ 363526Sxy150489 $(LINT_KMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 371167Skupfer $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) 380Sstevel@tonic-gate 390Sstevel@tonic-gate# EXPORT DELETE START 402228Skrishna$(CLOSED_BUILD)LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) 4112448Sgdamore@opensolaris.org$(CLOSED_BUILD)LINT_CLOSED_XMOD4 = $(CLOSED_XMODS:bnx=) 4212448Sgdamore@opensolaris.org$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(LINT_CLOSED_XMOD4:bnxe=) 4312448Sgdamore@opensolaris.org$(CLOSED_BUILD)LINT_CLOSED_XMOD2 = $(LINT_CLOSED_XMOD3:lsimega=) 443526Sxy150489$(CLOSED_BUILD)LINT_CLOSED_XMOD1 = $(LINT_CLOSED_XMOD2:adpu320=) 451167Skupfer$(CLOSED_BUILD)LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) 460Sstevel@tonic-gate 470Sstevel@tonic-gate# 486125Sbubbva# dprov is delivered in the SUNWcryptoint package. 490Sstevel@tonic-gate# 500Sstevel@tonic-gateDRV_KMODS += dprov 510Sstevel@tonic-gate 520Sstevel@tonic-gate# EXPORT DELETE END 530Sstevel@tonic-gate 540Sstevel@tonic-gate# 550Sstevel@tonic-gate# 560Sstevel@tonic-gatedef := TARGET= def 576094Sakolbdef.prereq := TARGET= def 580Sstevel@tonic-gateall := TARGET= all 596094Sakolball.prereq := TARGET= all 600Sstevel@tonic-gateinstall := TARGET= install 616094Sakolbinstall.prereq := TARGET= all 620Sstevel@tonic-gateclean := TARGET= clean 630Sstevel@tonic-gateclobber := TARGET= clobber 640Sstevel@tonic-gatelint := TARGET= lint 656094Sakolblint.prereq := TARGET= lint 660Sstevel@tonic-gatemodlintlib := TARGET= modlintlib 671167Skupfermodlist := TARGET= modlist 681167Skupfermodlist := NO_STATE= -K $$MODSTATE$$$$ 690Sstevel@tonic-gateclean.lint := TARGET= clean.lint 700Sstevel@tonic-gatecheck := TARGET= check 710Sstevel@tonic-gateinstall_h := TARGET= install_h 726094Sakolbinstall_h.prereq := TARGET= install_h 730Sstevel@tonic-gate 740Sstevel@tonic-gate.KEEP_STATE: 750Sstevel@tonic-gate 763446Smrj.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \ 773446Smrj $(CLOSED_XMODS) config $(LINT_DEPS) 780Sstevel@tonic-gate 79*12613SSurya.Prakki@Sun.COMdef all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) \ 802712Snn35248 $(SVVS) $(XMODS) $(CLOSED_XMODS) config 810Sstevel@tonic-gate 826094Sakolb 836094Sakolb# 846094Sakolb# Privilege constants 856094Sakolb# 866094Sakolb# NOTE: The rules for generating priv_const.c file are shared between all 876094Sakolb# processor architectures and and should be kept in sync. If they are changed in 886094Sakolb# this file make sure that sparc rules are updated as well. 896094Sakolb# 906094SakolbPRIVS_C = $(SRC)/uts/common/os/priv_const.c 916094Sakolb 926094Sakolb$(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF) 936094Sakolb $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@ 946094Sakolb 956094Sakolb# 966094Sakolb# Prerequisites 976094Sakolb# 986094Sakolb# The uts/Makefile defines build parallelism for x86 platforms such that i86pc, 996094Sakolb# i86xpv and intel are all built in parallel. This requires building certain 1006094Sakolb# parts before the parallel build can start. The uts/Makefile appends the 1016094Sakolb# '.prereq' string to the original target and executes this Makefile to build 1026094Sakolb# any prerequisites needed before the full parallel build can start. After that 1036094Sakolb# make continues with normal targets. 1046094Sakolb# 1056094Sakolb# Any build prerequisites for x86 builds should be described here. 1066094Sakolb# 1076094Sakolb# genassym is used to build intel/dtrace and genunix, so it should be built 1086094Sakolb# first. 1096094Sakolb# 1106094Sakolb# priv_const.c is required to build genunix. 1116094Sakolb# 1126094Sakolb# genunix is used by everyone to ctf-merge with. Genunix is CTF-merged with 1136094Sakolb# intel/ip so as a side effect this dependency builds intel/ip as part of the 1146094Sakolb# prerequisites. 1156094Sakolb# 1166094Sakolb# intel/dtrace depends on i86pc/genassym, so we need to build both 1176094Sakolb# i86pc/genassym and intel/genassym. 1186094Sakolb# 119*12613SSurya.Prakki@Sun.COMall.prereq install.prereq def.prereq: genunix FRC 1206094Sakolb @cd ../i86pc/genassym; pwd; $(MAKE) $(@:%.prereq=%) 1216094Sakolb 1226094Sakolb# 1236094Sakolb# i86pc lint libraries should be built first 1246094Sakolb# 1256094Sakolblint.prereq: FRC 1266094Sakolb @cd ../i86pc; pwd; $(MAKE) $(NO_STATE) lint 1276094Sakolb 1286094Sakolb# 1296094Sakolb# Nothing to do for any other prerequisite targets. 1306094Sakolb# 1316094Sakolb%.prereq: 1326094Sakolb 1336094Sakolbgenunix: $(PRIVS_C) 1346094Sakolb 1351167Skupfermodlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \ 1361167Skupfer $(XMODS) $(CLOSED_XMODS) 1370Sstevel@tonic-gate 138*12613SSurya.Prakki@Sun.COM$(KMODS) $(SUBDIRS) config: FRC 1391167Skupfer @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 1401167Skupfer 1411167Skupfer$(CLOSED_KMODS): FRC 1421167Skupfer cd $(CLOSED)/uts/intel/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) 1430Sstevel@tonic-gate 1441167Skupfer$(XMODS): FRC 1450Sstevel@tonic-gate @if [ -f $@/Makefile ]; then \ 1461167Skupfer cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ 1471167Skupfer else \ 1481167Skupfer true; \ 1491167Skupfer fi 1501167Skupfer 1511167Skupfer$(SVVS) $(CLOSED_XMODS): FRC 1521167Skupfer @if [ -f $(CLOSED)/uts/intel/$@/Makefile ]; then \ 1531167Skupfer cd $(CLOSED)/uts/intel/$@; pwd; \ 1541167Skupfer $(MAKE) $(NO_STATE) $(TARGET); \ 1550Sstevel@tonic-gate else \ 1560Sstevel@tonic-gate true; \ 1570Sstevel@tonic-gate fi 1580Sstevel@tonic-gate 1590Sstevel@tonic-gateinstall_h check: FRC 1600Sstevel@tonic-gate @cd sys; pwd; $(MAKE) $(TARGET) 1610Sstevel@tonic-gate @cd asm; pwd; $(MAKE) $(TARGET) 1620Sstevel@tonic-gate @cd ia32/sys; pwd; $(MAKE) $(TARGET) 1630Sstevel@tonic-gate @cd amd64/sys; pwd; $(MAKE) $(TARGET) 1640Sstevel@tonic-gate 1650Sstevel@tonic-gate# 1663446Smrj# Work-around to disable acpica global crosscheck lint warnings 1673446Smrj# 1683446SmrjLGREP.intel = grep -v 'intel/io/acpica' 1693446Smrj 1703446Smrj# 1710Sstevel@tonic-gate# Full kernel lint target. 1720Sstevel@tonic-gate# 1730Sstevel@tonic-gateLINT_TARGET = globallint 1740Sstevel@tonic-gate 1753446Smrj# workaround for multiply defined errors 1763446Smrjgloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 1773446Smrj 1780Sstevel@tonic-gategloballint: 1796094Sakolb @pwd 1800Sstevel@tonic-gate @-$(ECHO) "\nFULL KERNEL: global crosschecks:" 1813451Smrj @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.intel) | $(LGREP.2) 1820Sstevel@tonic-gate 1830Sstevel@tonic-gatelint: modlintlib .WAIT $(LINT_DEPS) 1840Sstevel@tonic-gate 1850Sstevel@tonic-gate# EXPORT DELETE START 1860Sstevel@tonic-gate 1870Sstevel@tonic-gateEXPORT_SRC: 1880Sstevel@tonic-gate $(RM) Makefile+ 1890Sstevel@tonic-gate sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 1900Sstevel@tonic-gate < Makefile > Makefile+ 1910Sstevel@tonic-gate $(MV) Makefile+ Makefile 1920Sstevel@tonic-gate $(CHMOD) 444 Makefile 1930Sstevel@tonic-gate 1940Sstevel@tonic-gate# EXPORT DELETE END 1950Sstevel@tonic-gate 1960Sstevel@tonic-gateinclude ../Makefile.targ 197