xref: /titanic_41/usr/src/uts/sun4v/montoya/Makefile (revision dd49f125507979bb2ab505a8daf2a46d1be27051)
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# uts/sun4v/montoya/Makefile
23# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28#	This makefile drives the production of the sun4v montoya platform
29#	modules.
30#
31#	sun4v montoya implementation architecture dependent
32#
33
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE	= ../..
38
39#
40#	Include common rules.
41#
42include $(UTSBASE)/sun4v/montoya/Makefile.montoya
43
44def		:=	TARGET= def
45all		:=	TARGET= all
46install		:=	TARGET= install
47install_h	:=	TARGET= install_h
48clean		:=	TARGET= clean
49clobber		:=	TARGET= clobber
50lint		:=	TARGET= lint
51lintlib		:=	TARGET= lintlib
52modlintlib	:=	TARGET= modlintlib
53modlist		:=	TARGET= modlist
54modlist		:=	NO_STATE= -K $$MODSTATE$$$$
55clean.lint	:=	TARGET= clean.lint
56check		:=	TARGET= check
57
58#
59#	Default build targets.
60#
61.KEEP_STATE:
62
63def all clean clobber clean.lint modlist:	$(MONTOYA_KMODS)
64
65lintlib:      unix
66
67modlintlib:   $(MONTOYA_KMODS)
68
69IMPLEMENTED_PLATFORM	= SUNW,Netra-CP3060
70
71install:	$(ROOT_MONTOYA_DIR) $(USR_MONTOYA_DIR) \
72		$(USR_MONTOYA_LIB_DIR) \
73		$(ROOT_MONTOYA_LIB_DIR) \
74		$(USR_MONTOYA_SBIN_DIR) \
75		$(USR_MONTOYA_SBIN_LINKS) \
76		.WAIT $(MONTOYA_KMODS)
77
78$(MONTOYA_KMODS):	FRC
79	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
80
81install_h check:	FRC
82
83lint:	modlintlib .WAIT $(LINT_DEPS)
84
85LINT_LIBS	= $(LINT_LIB) \
86			-L$(MONTOYA_LINT_LIB_DIR) \
87			-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
88			    $(CLOSED_LINT_KMODS:%=-l%) \
89			-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
90
91lint.platmod:   modlintlib
92	@-$(ECHO) "\n$(IMPLEMENTED_PLATFORM) platform-dependent module: global crosschecks:"
93	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
94
95EXPORT_SRC:
96	$(RM) Makefile+
97	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
98		< Makefile > Makefile+
99	$(MV) Makefile+ Makefile
100	$(CHMOD) 444 Makefile
101# EXPORT DELETE END
102
103#
104#	Include common targets.
105#
106include $(UTSBASE)/$(PLATFORM)/montoya/Makefile.targ
107