xref: /titanic_52/usr/src/uts/sun4u/blade/Makefile (revision 55f5292c612446ce6f93ddd248c0019b5974618b)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24#	This makefile drives the production of the sun4u JBOS - blade platform
25#	module.
26#
27#	sun4u jbos-blade implementation architecture dependent
28#
29
30#
31#	Path to the base of the uts directory tree (usually /usr/src/uts).
32#
33UTSBASE	= ../..
34
35include $(UTSBASE)/sun4u/blade/Makefile.blade
36
37#
38#
39#
40
41def		:=	TARGET= def
42all		:=	TARGET= all
43install		:=	TARGET= install
44install_h	:=	TARGET= install_h
45clean		:=	TARGET= clean
46clobber		:=	TARGET= clobber
47lint		:=	TARGET= lint
48lintlib		:=	TARGET= lintlib
49modlintlib	:=	TARGET= modlintlib
50modlist		:=	TARGET= modlist
51modlist		:=	NO_STATE= -K $$MODSTATE$$$$
52clean.lint	:=	TARGET= clean.lint
53check		:=	TARGET= check
54
55IMPLEMENTED_PLATFORM	= SUNW,Serverblade1
56LINK1DESTDIR	=	../../../../SUNW,Sun-Blade-100/kernel/drv/sparcv9
57BLADE_LINK_1	=	SUNW,Serverblade1/kernel/drv/sparcv9/pmubus
58BLADE_PLAT_LINK1 =	$(BLADE_LINK_1:%=$(ROOT_PLAT_DIR)/%)
59
60#
61#	Default build targets.
62#
63.KEEP_STATE:
64
65.PARALLEL:	$(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
66
67def all clean clobber clean.lint modlist: $(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
68
69install:	$(ROOT_BLADE_DIR) \
70		$(USR_BLADE_DIR) \
71		$(USR_BLADE_INC_DIR) \
72		$(USR_BLADE_SBIN_DIR) \
73		$(USR_BLADE_LIB_DIR) \
74		.WAIT $(BLADE_KMODS) $(CLOSED_BLADE_KMODS) \
75		$(BLADE_OPTION) \
76		$(BLADE_PLAT_LINK_1)
77
78modlintlib:	$(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
79
80$(BLADE_KMODS):	FRC
81	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
82
83$(CLOSED_BLADE_KMODS):	FRC
84	cd $(CLOSED)/uts/sun4u/blade/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
85
86$(BLADE_OPTION):	FRC
87	@cd $@; pwd; $(MAKE) $(TARGET)
88
89install_h check:
90
91lint:	modlintlib .WAIT $(LINT_DEPS)
92
93LINT_LIBS	= $(LINT_LIB) \
94			-L$(BLADE_LINT_LIB_DIR) \
95			-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
96			    $(CLOSED_LINT_KMODS:%=-l%) \
97			-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
98
99lint.platmod:   modlintlib
100	@-$(ECHO) "\nJBOS-blade Platform-dependent module: global crosschecks:"
101	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
102
103
104$(BLADE_PLAT_LINK_1): $(ROOT_BLADE_DRV_DIR)
105	$(RM) $@; $(SYMLINK) $(LINK1DESTDIR)/$(@F) $@
106#
107#	Include common targets.
108#
109include $(UTSBASE)/sun4u/blade/Makefile.targ
110