xref: /titanic_50/usr/src/uts/sun4u/mpxu/Makefile (revision 554ff184129088135ad2643c1c9832174a17be88)
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 2004 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
56clean.lint	:=	TARGET= clean.lint
57check		:=	TARGET= check
58
59#
60#	Default build targets.
61#
62.KEEP_STATE:
63
64def all clean clean.lint clobber: $(MPXU_KMODS)
65
66lintlib:	unix
67
68modlintlib:	$(MPXU_KMODS)
69
70IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire-V240
71
72LINKED_PLATFORMS	= SUNW,Sun-Fire-V210
73LINKED_PLATFORMS	+= SUNW,Netra-240
74LINKED_PLATFORMS	+= SUNW,Netra-210
75
76
77# EXPORT DELETE START
78#
79# aes256 is delivered in the SUNWcryr package which is removed from
80# the EXPORT_SRC build.
81#
82MPXU_CRYPTO_LINKS	+= aes256
83# EXPORT DELETE END
84
85install:	$(ROOT_MPXU_DIR) $(USR_MPXU_DIR) \
86		$(USR_MPXU_INC_DIR) \
87		$(USR_MPXU_SBIN_EEPROM) \
88		$(USR_MPXU_SBIN_PRTDIAG) \
89		$(USR_MPXU_SBIN_TRAPSTAT) \
90		$(USR_MPXU_SBIN_FRUADM) \
91		$(USR_MPXU_LIB_DIR) \
92		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) \
93		$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
94		$(MPXU_CRYPTO_LINKS) \
95		.WAIT $(MPXU_KMODS)
96
97$(MPXU_KMODS): FRC
98	@cd $@; pwd; $(MAKE) $(TARGET)
99
100$(MPXU_CRYPTO_LINKS): $(ROOT_MPXU_CRYPTO_DIR_64)
101	-$(RM) $(ROOT_MPXU_CRYPTO_DIR_64)/$@;
102	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_MPXU_CRYPTO_DIR_64)/$@
103
104install_h check:	FRC
105	@cd sys; pwd; $(MAKE) $(TARGET)
106
107
108lint:		modlintlib
109
110LINT_LIBS	 = $(LINT_LIB) \
111		   -L$(MPXU_LINT_LIB_DIR) \
112		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
113		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
114
115lint.platmod:	modlintlib
116	@-$(ECHO) "\nMPXU Platform-dependent module: global crosschecks:"
117	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
118
119# EXPORT DELETE START
120
121EXPORT_SRC:
122	$(RM) Makefile+
123	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
124	    < Makefile > Makefile+
125	$(MV) Makefile+ Makefile
126	$(CHMOD) 444 Makefile
127
128# EXPORT DELETE END
129
130#
131#
132#	Include common targets.
133#
134include $(UTSBASE)/sun4u/mpxu/Makefile.targ
135