xref: /titanic_44/usr/src/uts/i86xpv/Makefile (revision 97adda444bedd8afa322c1d2233957d40bc8e35c)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26#
27#	This makefile drives the production of all implementation architecture
28#	dependent modules for the i86xpv architecture.
29#
30
31UTSBASE = ..
32
33include Makefile.i86xpv
34
35#
36#	The following are x86 specific (rather than i86pc) specific modules
37#	which are required for the i86pc kernel to completely lint. They are
38#	not involved in the build in any other way. In order to minimize
39#	build time, it is assumed that they are up to date.
40#
41INTEL_LIB_DIR	 = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
42
43INTEL_LINTS	 = genunix
44
45LINT_LIBS	 = \
46		   $(GENUNIX_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
47		   $(PARALLEL_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
48		   $(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln)
49
50I86XPV_LINTS =	xdb xnb xnbe xnbo xnbu xpvtap
51
52#
53#
54#
55def		:=	TARGET= def
56all		:=	TARGET= all
57install		:=	TARGET= install
58clean		:=	TARGET= clean
59clobber		:=	TARGET= clobber
60lint		:=	TARGET= lint
61lintlib		:=	TARGET= lintlib
62machmodlintlib	:=	TARGET= modlintlib
63modlist		:=	TARGET= modlist
64modlist	modlist.intel :=	NO_STATE= -K $$MODSTATE$$$$
65clean.lint	:=	TARGET= clean.lint
66check		:=	TARGET= check
67
68.KEEP_STATE:
69
70.PARALLEL:	$(PARALLEL_KMODS) $(XMODS) modlist modlist.intel
71
72INITIAL_TARGETS = \
73	genassym \
74	unix \
75	cpu/scripts
76
77def all clean clobber clean.lint: setup genassym unix .WAIT \
78	$(KMODS) $(XMODS)
79
80install: install_platforms setup genassym unix .WAIT \
81	$(KMODS) $(XMODS)
82
83# Need to clean in here too because of lint.
84clean: $(I86XPV_LINTS)
85
86# list the modules under i86xpv.
87modlist: unix $(KMODS) $(XMODS)
88
89# list the modules for Install -k i86xpv.
90modlist.karch: modlist modlist.intel
91
92modlist.intel:
93	@cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist
94
95lintlib:	unix
96
97modlintlib:	$(KMODS)
98
99genassym unix $(KMODS):	FRC
100	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
101
102setup: FRC
103	@cd cpu/scripts; pwd; $(MAKE) $(TARGET)
104
105$(XMODS):	FRC
106	@if [ -f $@/Makefile  ]; then \
107		cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
108	else \
109		true; \
110	fi
111
112install_h check:	FRC
113	@cd sys; pwd; $(MAKE) $(TARGET)
114
115#
116# Definitions for the /platform directory aliases.
117# Currently none for i86xpv.
118#
119PLAT_LINKS	=
120
121#
122# Make the /platform directories.  This is hardwired here because
123# the first stage of the project (KBI) only implements the userland
124# changes, but the only reasonable place to record the aliases is
125# here in kernel land.
126#
127install_platforms:	$(ROOT_PSM_DIR) $(USR_PSM_DIR) \
128			$(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \
129			$(OEM_USR_PLAT_LINKS)
130
131#
132#	Full kernel lint target.
133#
134LINT_TARGET	= globallint
135
136# workaround for multiply defined errors
137globallint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
138
139globallint:
140	@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
141	@-$(LINT) $(LINTFLAGS) $(LINT_LIB) $(LINT_LIBS) 2>&1 | $(LGREP.2)
142
143lint:	lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS)
144
145$(INTEL_LINTS):	FRC
146	@cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib
147
148FRC:
149
150include ../Makefile.targ
151
152#
153# Cross-reference customization: build a cross-reference over all of the
154# i86pc-related directories.
155#
156XRDIRS	= ../i86xpv ../i86pc ../intel ../common
157XRPRUNE	= sun4v sun4u sun4 sfmmu sparc
158
159cscope.out tags: FRC
160	$(XREF) -x $@
161