xref: /illumos-gate/usr/src/uts/i86xpv/Makefile (revision c0e7977a)
1843e1988Sjohnlev#
2843e1988Sjohnlev# CDDL HEADER START
3843e1988Sjohnlev#
4843e1988Sjohnlev# The contents of this file are subject to the terms of the
5843e1988Sjohnlev# Common Development and Distribution License (the "License").
6843e1988Sjohnlev# You may not use this file except in compliance with the License.
7843e1988Sjohnlev#
8843e1988Sjohnlev# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9843e1988Sjohnlev# or http://www.opensolaris.org/os/licensing.
10843e1988Sjohnlev# See the License for the specific language governing permissions
11843e1988Sjohnlev# and limitations under the License.
12843e1988Sjohnlev#
13843e1988Sjohnlev# When distributing Covered Code, include this CDDL HEADER in each
14843e1988Sjohnlev# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15843e1988Sjohnlev# If applicable, add the following below this CDDL HEADER, with the
16843e1988Sjohnlev# fields enclosed by brackets "[]" replaced with your own identifying
17843e1988Sjohnlev# information: Portions Copyright [yyyy] [name of copyright owner]
18843e1988Sjohnlev#
19843e1988Sjohnlev# CDDL HEADER END
20843e1988Sjohnlev#
21843e1988Sjohnlev#
22843e1988Sjohnlev# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23843e1988Sjohnlev# Use is subject to license terms.
24843e1988Sjohnlev#
25a0900badSGarrett D'Amore# Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26843e1988Sjohnlev#
27843e1988Sjohnlev#	This makefile drives the production of all implementation architecture
28843e1988Sjohnlev#	dependent modules for the i86xpv architecture.
29843e1988Sjohnlev#
30843e1988Sjohnlev
31843e1988SjohnlevUTSBASE = ..
32843e1988Sjohnlev
33843e1988Sjohnlevinclude Makefile.i86xpv
34843e1988Sjohnlev
35843e1988Sjohnlev#
36843e1988Sjohnlev#	The following are x86 specific (rather than i86pc) specific modules
37843e1988Sjohnlev#	which are required for the i86pc kernel to completely lint. They are
38843e1988Sjohnlev#	not involved in the build in any other way. In order to minimize
39843e1988Sjohnlev#	build time, it is assumed that they are up to date.
40843e1988Sjohnlev#
41843e1988SjohnlevINTEL_LIB_DIR	 = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
42843e1988Sjohnlev
43843e1988SjohnlevINTEL_LINTS	 = genunix
44843e1988Sjohnlev
45b6805bf7SGordon RossLINT_LIBS	 = \
46843e1988Sjohnlev		   $(GENUNIX_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
47843e1988Sjohnlev		   $(PARALLEL_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
48843e1988Sjohnlev		   $(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln)
49843e1988Sjohnlev
50b6805bf7SGordon RossI86XPV_LINTS =	xdb xnb xnbe xnbo xnbu xpvtap
51b6805bf7SGordon Ross
52843e1988Sjohnlev#
53843e1988Sjohnlev#
54843e1988Sjohnlev#
55843e1988Sjohnlevdef		:=	TARGET= def
56843e1988Sjohnlevall		:=	TARGET= all
57843e1988Sjohnlevinstall		:=	TARGET= install
58843e1988Sjohnlevclean		:=	TARGET= clean
59843e1988Sjohnlevclobber		:=	TARGET= clobber
60843e1988Sjohnlevlint		:=	TARGET= lint
61843e1988Sjohnlevlintlib		:=	TARGET= lintlib
62843e1988Sjohnlevmachmodlintlib	:=	TARGET= modlintlib
63843e1988Sjohnlevmodlist		:=	TARGET= modlist
64843e1988Sjohnlevmodlist	modlist.intel :=	NO_STATE= -K $$MODSTATE$$$$
65843e1988Sjohnlevclean.lint	:=	TARGET= clean.lint
66843e1988Sjohnlevcheck		:=	TARGET= check
67843e1988Sjohnlev
68843e1988Sjohnlev.KEEP_STATE:
69843e1988Sjohnlev
70*c0e7977aSJosef 'Jeff' Sipek.PARALLEL:	$(PARALLEL_KMODS) $(XMODS) modlist modlist.intel
71843e1988Sjohnlev
72843e1988SjohnlevINITIAL_TARGETS = \
73843e1988Sjohnlev	genassym \
74a0900badSGarrett D'Amore	unix \
75a0900badSGarrett D'Amore	cpu/scripts
76843e1988Sjohnlev
77843e1988Sjohnlevdef all clean clobber clean.lint: setup genassym unix .WAIT \
78*c0e7977aSJosef 'Jeff' Sipek	$(KMODS) $(XMODS)
79843e1988Sjohnlev
80843e1988Sjohnlevinstall: install_platforms setup genassym unix .WAIT \
81*c0e7977aSJosef 'Jeff' Sipek	$(KMODS) $(XMODS)
82843e1988Sjohnlev
83b6805bf7SGordon Ross# Need to clean in here too because of lint.
84b6805bf7SGordon Rossclean: $(I86XPV_LINTS)
85b6805bf7SGordon Ross
86843e1988Sjohnlev# list the modules under i86xpv.
87*c0e7977aSJosef 'Jeff' Sipekmodlist: unix $(KMODS) $(XMODS)
88843e1988Sjohnlev
89843e1988Sjohnlev# list the modules for Install -k i86xpv.
90843e1988Sjohnlevmodlist.karch: modlist modlist.intel
91843e1988Sjohnlev
92843e1988Sjohnlevmodlist.intel:
93843e1988Sjohnlev	@cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist
94843e1988Sjohnlev
95843e1988Sjohnlevlintlib:	unix
96843e1988Sjohnlev
97*c0e7977aSJosef 'Jeff' Sipekmodlintlib:	$(KMODS)
98843e1988Sjohnlev
99843e1988Sjohnlevgenassym unix $(KMODS):	FRC
100843e1988Sjohnlev	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
101843e1988Sjohnlev
102843e1988Sjohnlevsetup: FRC
103a0900badSGarrett D'Amore	@cd cpu/scripts; pwd; $(MAKE) $(TARGET)
104843e1988Sjohnlev
105843e1988Sjohnlev$(XMODS):	FRC
106843e1988Sjohnlev	@if [ -f $@/Makefile  ]; then \
107843e1988Sjohnlev		cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
108843e1988Sjohnlev	else \
109843e1988Sjohnlev		true; \
110843e1988Sjohnlev	fi
111843e1988Sjohnlev
112843e1988Sjohnlevinstall_h check:	FRC
113843e1988Sjohnlev	@cd sys; pwd; $(MAKE) $(TARGET)
114843e1988Sjohnlev
115843e1988Sjohnlev#
116843e1988Sjohnlev# Definitions for the /platform directory aliases.
117843e1988Sjohnlev# Currently none for i86xpv.
118843e1988Sjohnlev#
119843e1988SjohnlevPLAT_LINKS	=
120843e1988Sjohnlev
121843e1988Sjohnlev#
122843e1988Sjohnlev# Make the /platform directories.  This is hardwired here because
123843e1988Sjohnlev# the first stage of the project (KBI) only implements the userland
124843e1988Sjohnlev# changes, but the only reasonable place to record the aliases is
125843e1988Sjohnlev# here in kernel land.
126843e1988Sjohnlev#
127843e1988Sjohnlevinstall_platforms:	$(ROOT_PSM_DIR) $(USR_PSM_DIR) \
128843e1988Sjohnlev			$(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \
129843e1988Sjohnlev			$(OEM_USR_PLAT_LINKS)
130843e1988Sjohnlev
131843e1988Sjohnlev#
132843e1988Sjohnlev#	Full kernel lint target.
133843e1988Sjohnlev#
134843e1988SjohnlevLINT_TARGET	= globallint
135843e1988Sjohnlev
136843e1988Sjohnlev# workaround for multiply defined errors
137843e1988Sjohnlevgloballint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
138843e1988Sjohnlev
139843e1988Sjohnlevgloballint:
140843e1988Sjohnlev	@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
141b6805bf7SGordon Ross	@-$(LINT) $(LINTFLAGS) $(LINT_LIB) $(LINT_LIBS) 2>&1 | $(LGREP.2)
142843e1988Sjohnlev
143843e1988Sjohnlevlint:	lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS)
144843e1988Sjohnlev
145843e1988Sjohnlev$(INTEL_LINTS):	FRC
146843e1988Sjohnlev	@cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib
147843e1988Sjohnlev
148843e1988SjohnlevFRC:
149843e1988Sjohnlev
150843e1988Sjohnlevinclude ../Makefile.targ
151843e1988Sjohnlev
152843e1988Sjohnlev#
153843e1988Sjohnlev# Cross-reference customization: build a cross-reference over all of the
154843e1988Sjohnlev# i86pc-related directories.
155843e1988Sjohnlev#
156*c0e7977aSJosef 'Jeff' SipekXRDIRS	= ../i86xpv ../i86pc ../intel ../common
157843e1988SjohnlevXRPRUNE	= sun4v sun4u sun4 sfmmu sparc
158843e1988Sjohnlev
159843e1988Sjohnlevcscope.out tags: FRC
160843e1988Sjohnlev	$(XREF) -x $@
161