xref: /titanic_52/usr/src/uts/sun4v/ontario/Makefile (revision d51e90740114c60620c0febffd4d3ce6e280a107)
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/ontario/Makefile
23# Copyright 2006 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 ontario platform
29#	modules.
30#
31#	sun4v ontario 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/ontario/Makefile.ontario
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:	$(ONTARIO_KMODS)
64
65lintlib:      unix
66
67modlintlib:   $(ONTARIO_KMODS)
68
69IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire-T200
70LINKED_PLATFORMS	= SUNW,Sun-Fire-T1000
71LINKED_PLATFORMS	+= SUNW,SPARC-Enterprise-T1000
72LINKED_PLATFORMS	+= SUNW,Netra-T2000
73LINKED_PLATFORMS	+= SUNW,SPARC-Enterprise-T5120
74LINKED_PLATFORMS	+= SUNW,SPARC-Enterprise-T5220
75LINKED_PLATFORMS	+= SUNW,SPARC-Enterprise-T2000
76PPLINKED_PLATFORMS	= SUNW,Netra-T2000
77PPLINKED_PLATFORMS	+= SUNW,SPARC-Enterprise-T2000
78
79install:	$(ROOT_ONTARIO_DIR) $(USR_ONTARIO_DIR) \
80		$(USR_ONTARIO_SBIN_DIR) \
81		$(USR_ONTARIO_LIB_DIR) \
82		$(ROOT_ONTARIO_LIB_DIR) \
83		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) \
84		$(PPLINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
85		.WAIT $(ONTARIO_KMODS)
86
87$(ONTARIO_KMODS):	FRC
88	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
89
90install_h check:	FRC
91
92lint:	modlintlib .WAIT $(LINT_DEPS)
93
94LINT_LIBS	= $(LINT_LIB) \
95			-L$(ONTARIO_LINT_LIB_DIR) \
96			-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
97			    $(CLOSED_LINT_KMODS:%=-l%) \
98			-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
99
100lint.platmod:   modlintlib
101	@-$(ECHO) "\n$(IMPLEMENTED_PLATFORM) platform-dependent module: global crosschecks:"
102	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
103
104EXPORT_SRC:
105	$(RM) Makefile+
106	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
107		< Makefile > Makefile+
108	$(MV) Makefile+ Makefile
109	$(CHMOD) 444 Makefile
110# EXPORT DELETE END
111
112#
113#	Include common targets.
114#
115include $(UTSBASE)/$(PLATFORM)/ontario/Makefile.targ
116