xref: /titanic_50/usr/src/uts/sun4u/blade/Makefile (revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#pragma ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28#	This makefile drives the production of the sun4u JBOS - blade platform
29#	module.
30#
31#	sun4u jbos-blade implementation architecture dependent
32#
33
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE	= ../..
38
39include $(UTSBASE)/sun4u/blade/Makefile.blade
40
41#
42#
43#
44
45def		:=	TARGET= def
46all		:=	TARGET= all
47install		:=	TARGET= install
48install_h	:=	TARGET= install_h
49clean		:=	TARGET= clean
50clobber		:=	TARGET= clobber
51lint		:=	TARGET= lint
52lintlib		:=	TARGET= lintlib
53modlintlib	:=	TARGET= modlintlib
54modlist		:=	TARGET= modlist
55modlist		:=	NO_STATE= -K $$MODSTATE$$$$
56clean.lint	:=	TARGET= clean.lint
57check		:=	TARGET= check
58
59IMPLEMENTED_PLATFORM	= SUNW,Serverblade1
60LINK1DESTDIR	=	../../../../SUNW,Sun-Blade-100/kernel/drv/sparcv9
61BLADE_LINK_1	=	SUNW,Serverblade1/kernel/drv/sparcv9/pmubus
62BLADE_PLAT_LINK1 =	$(BLADE_LINK_1:%=$(ROOT_PLAT_DIR)/%)
63
64#
65#	Default build targets.
66#
67.KEEP_STATE:
68
69.PARALLEL:	$(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
70
71def all clean clobber clean.lint modlist: $(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
72
73install:	$(ROOT_BLADE_DIR) \
74		$(USR_BLADE_DIR) \
75		$(USR_BLADE_INC_DIR) \
76		$(USR_BLADE_SBIN_DIR) \
77		$(USR_BLADE_LIB_DIR) \
78		.WAIT $(BLADE_KMODS) $(CLOSED_BLADE_KMODS) \
79		$(BLADE_OPTION) \
80		$(BLADE_PLAT_LINK_1)
81
82modlintlib:	$(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
83
84$(BLADE_KMODS):	FRC
85	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
86
87$(CLOSED_BLADE_KMODS):	FRC
88	cd $(CLOSED)/uts/sun4u/blade/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
89
90$(BLADE_OPTION):	FRC
91	@cd $@; pwd; $(MAKE) $(TARGET)
92
93install_h check:
94
95lint:	modlintlib .WAIT $(LINT_DEPS)
96
97LINT_LIBS	= $(LINT_LIB) \
98			-L$(BLADE_LINT_LIB_DIR) \
99			-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
100			    $(CLOSED_LINT_KMODS:%=-l%) \
101			-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
102
103lint.platmod:   modlintlib
104	@-$(ECHO) "\nJBOS-blade Platform-dependent module: global crosschecks:"
105	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
106
107
108$(BLADE_PLAT_LINK_1): $(ROOT_BLADE_DRV_DIR)
109	$(RM) $@; $(SYMLINK) $(LINK1DESTDIR)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
110#
111#	Include common targets.
112#
113include $(UTSBASE)/sun4u/blade/Makefile.targ
114