xref: /illumos-gate/usr/src/uts/i86pc/i86hvm/Makefile (revision eb0cc229)
1*eb0cc229Sedp#
2*eb0cc229Sedp# CDDL HEADER START
3*eb0cc229Sedp#
4*eb0cc229Sedp# The contents of this file are subject to the terms of the
5*eb0cc229Sedp# Common Development and Distribution License (the "License").
6*eb0cc229Sedp# You may not use this file except in compliance with the License.
7*eb0cc229Sedp#
8*eb0cc229Sedp# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*eb0cc229Sedp# or http://www.opensolaris.org/os/licensing.
10*eb0cc229Sedp# See the License for the specific language governing permissions
11*eb0cc229Sedp# and limitations under the License.
12*eb0cc229Sedp#
13*eb0cc229Sedp# When distributing Covered Code, include this CDDL HEADER in each
14*eb0cc229Sedp# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*eb0cc229Sedp# If applicable, add the following below this CDDL HEADER, with the
16*eb0cc229Sedp# fields enclosed by brackets "[]" replaced with your own identifying
17*eb0cc229Sedp# information: Portions Copyright [yyyy] [name of copyright owner]
18*eb0cc229Sedp#
19*eb0cc229Sedp# CDDL HEADER END
20*eb0cc229Sedp#
21*eb0cc229Sedp#
22*eb0cc229Sedp# uts/i86pc/i86hvm/Makefile
23*eb0cc229Sedp# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24*eb0cc229Sedp# Use is subject to license terms.
25*eb0cc229Sedp#
26*eb0cc229Sedp#ident	"%Z%%M%	%I%	%E% SMI"
27*eb0cc229Sedp#
28*eb0cc229Sedp#	This makefile drives the production of the i86hvm platform modules.
29*eb0cc229Sedp#
30*eb0cc229Sedp#	i86pc implementation architecture dependent
31*eb0cc229Sedp#
32*eb0cc229Sedp
33*eb0cc229Sedp#
34*eb0cc229Sedp#	Path to the base of the uts directory tree (usually /usr/src/uts).
35*eb0cc229Sedp#
36*eb0cc229SedpUTSBASE	= ../..
37*eb0cc229Sedp
38*eb0cc229Sedp#
39*eb0cc229Sedp#	Include common rules.
40*eb0cc229Sedp#
41*eb0cc229Sedpinclude $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm
42*eb0cc229Sedp
43*eb0cc229Sedpdef		:=	TARGET= def
44*eb0cc229Sedpall		:=	TARGET= all
45*eb0cc229Sedpinstall		:=	TARGET= install
46*eb0cc229Sedpinstall_h	:=	TARGET= install_h
47*eb0cc229Sedpclean		:=	TARGET= clean
48*eb0cc229Sedpclobber		:=	TARGET= clobber
49*eb0cc229Sedplint		:=	TARGET= lint
50*eb0cc229Sedplintlib		:=	TARGET= lintlib
51*eb0cc229Sedpmodlintlib	:=	TARGET= modlintlib
52*eb0cc229Sedpmodlist		:=	TARGET= modlist
53*eb0cc229Sedpmodlist		:=	NO_STATE= -K $$MODSTATE$$$$
54*eb0cc229Sedpclean.lint	:=	TARGET= clean.lint
55*eb0cc229Sedpcheck		:=	TARGET= check
56*eb0cc229Sedp
57*eb0cc229Sedp#
58*eb0cc229Sedp#	Default build targets.
59*eb0cc229Sedp#
60*eb0cc229Sedp.KEEP_STATE:
61*eb0cc229Sedp
62*eb0cc229Sedp.PARALLEL: $(HVM_KMODS)
63*eb0cc229Sedp
64*eb0cc229Sedpdef all clean clobber clean.lint modlist modlintlib:	$(HVM_KMODS)
65*eb0cc229Sedp
66*eb0cc229Sedpinstall: install_implementations .WAIT \
67*eb0cc229Sedp	$(HVM_KMODS)
68*eb0cc229Sedp
69*eb0cc229Sedpinstall_implementations: \
70*eb0cc229Sedp	$(ROOT_HVM_DIR) \
71*eb0cc229Sedp	$(ROOT_HVM_DRV_DIR) \
72*eb0cc229Sedp	$(ROOT_HVM_MISC_DIR) \
73*eb0cc229Sedp	$(USR_HVM_DIR)
74*eb0cc229Sedp
75*eb0cc229Sedp$(HVM_KMODS):	FRC
76*eb0cc229Sedp	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
77*eb0cc229Sedp
78*eb0cc229Sedpinstall_h check:	FRC
79*eb0cc229Sedp
80*eb0cc229Sedplintlib lint:	modlintlib .WAIT $(LINT_DEPS)
81*eb0cc229Sedp
82*eb0cc229Sedp#
83*eb0cc229Sedp# The 'lint.platmod' target lints the i86hvm platform modules against the i86pc
84*eb0cc229Sedp# kernel.  This ends up doing all the kernel cross-checks.
85*eb0cc229Sedp#
86*eb0cc229SedpLINT_TARGET	= lint.platmod
87*eb0cc229SedpINTEL_LIB_DIR	= $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
88*eb0cc229SedpINTEL_LINTS	= genunix
89*eb0cc229SedpLINT_LIBS	= $(LINT_LIB) \
90*eb0cc229Sedp		  -L$(HVM_LINT_LIB_DIR) \
91*eb0cc229Sedp		  -L$(LINT_LIB_DIR) \
92*eb0cc229Sedp			$(GENUNIX_KMODS:%=-l%) \
93*eb0cc229Sedp			$(PARALLEL_KMODS:%=-l%) \
94*eb0cc229Sedp			$(CLOSED_KMODS:%=-l%) \
95*eb0cc229Sedp		  -L$(INTEL_LIB_DIR) \
96*eb0cc229Sedp			$(INTEL_LINTS:%=-l%)
97*eb0cc229Sedp
98*eb0cc229Sedp# workaround for multiply defined errors
99*eb0cc229Sedplint.platmod := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
100*eb0cc229Sedp
101*eb0cc229Sedplint.platmod:   modlintlib
102*eb0cc229Sedp	@-$(ECHO) "\ni86hvm platform-dependent module: global crosschecks:"
103*eb0cc229Sedp	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
104*eb0cc229Sedp
105*eb0cc229Sedp#
106*eb0cc229Sedp#	Include common targets.
107*eb0cc229Sedp#
108*eb0cc229Sedpinclude $(UTSBASE)/$(PLATFORM)/i86hvm/Makefile.targ
109