xref: /titanic_51/usr/src/uts/sun4u/mpxu/Makefile (revision faebf79429f1b4c0f9334ac0f880806edf891f1f)
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# uts/sun4u/mpxu/Makefile
24# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#ident	"%Z%%M%	%I%	%E% SMI"
28#
29
30#
31#	This makefile drives the production of the sun4u mpxu platform
32#	module.
33#
34#	sun4u implementation architecture dependent
35#
36
37#
38#	Path to the base of the uts directory tree (usually /usr/src/uts).
39#
40UTSBASE	= ../..
41
42#
43#	Include common rules.
44#
45include $(UTSBASE)/sun4u/mpxu/Makefile.mpxu
46
47def		:=	TARGET= def
48all		:=	TARGET= all
49install		:=	TARGET= install
50install_h	:=	TARGET= install_h
51clean		:=	TARGET= clean
52clobber		:=	TARGET= clobber
53lint		:=	TARGET= lint
54lintlib		:=	TARGET= lintlib
55modlintlib	:=	TARGET= modlintlib
56modlist		:=	TARGET= modlist
57modlist		:=	NO_STATE= -K $$MODSTATE$$$$
58clean.lint	:=	TARGET= clean.lint
59check		:=	TARGET= check
60
61#
62#	Default build targets.
63#
64.KEEP_STATE:
65
66def all clean clean.lint clobber modlist: $(MPXU_KMODS) $(CLOSED_MPXU_KMODS)
67
68lintlib:	unix
69
70modlintlib:	$(MPXU_KMODS) $(CLOSED_MPXU_KMODS)
71
72IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire-V240
73
74LINKED_PLATFORMS	= SUNW,Sun-Fire-V210
75LINKED_PLATFORMS	+= SUNW,Netra-240
76LINKED_PLATFORMS	+= SUNW,Netra-210
77
78
79# EXPORT DELETE START
80#
81# aes256 is delivered in the SUNWcryr package which is removed from
82# the EXPORT_SRC build.
83#
84MPXU_CRYPTO_LINKS	+= aes256
85# EXPORT DELETE END
86
87install:	$(ROOT_MPXU_DIR) $(USR_MPXU_DIR) \
88		$(USR_MPXU_INC_DIR) \
89		$(USR_MPXU_SBIN_EEPROM) \
90		$(USR_MPXU_SBIN_PRTDIAG) \
91		$(USR_MPXU_SBIN_TRAPSTAT) \
92		$(USR_MPXU_SBIN_FRUADM) \
93		$(USR_MPXU_LIB_DIR) \
94		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) \
95		$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
96		$(MPXU_CRYPTO_LINKS) \
97		$(CLOSED_MPXU_KMODS) \
98		.WAIT $(MPXU_KMODS)
99
100$(MPXU_KMODS): FRC
101	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
102
103$(CLOSED_MPXU_KMODS): FRC
104	cd $(CLOSED)/uts/sun4u/mpxu/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
105
106$(MPXU_CRYPTO_LINKS): $(ROOT_MPXU_CRYPTO_DIR_64)
107	-$(RM) $(ROOT_MPXU_CRYPTO_DIR_64)/$@;
108	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_MPXU_CRYPTO_DIR_64)/$@
109
110install_h check:	FRC
111	@cd sys; pwd; $(MAKE) $(TARGET)
112
113
114lint:		modlintlib
115
116LINT_LIBS	 = $(LINT_LIB) \
117		   -L$(MPXU_LINT_LIB_DIR) \
118		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
119		       $(CLOSED_LINT_KMODS:%=-l%) \
120		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
121
122lint.platmod:	modlintlib
123	@-$(ECHO) "\nMPXU Platform-dependent module: global crosschecks:"
124	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
125
126# EXPORT DELETE START
127
128EXPORT_SRC:
129	$(RM) Makefile+
130	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
131	    < Makefile > Makefile+
132	$(MV) Makefile+ Makefile
133	$(CHMOD) 444 Makefile
134
135# EXPORT DELETE END
136
137#
138#
139#	Include common targets.
140#
141include $(UTSBASE)/sun4u/mpxu/Makefile.targ
142