xref: /titanic_41/usr/src/uts/sun4u/cherrystone/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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/cherrystone/Makefile
24# Copyright 2001-2003 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#ident	"%Z%%M%	%I%	%E% SMI"
28#
29#	This makefile drives the production of all Cherrystone system
30#	dependent modules for the sun4u architecture.
31#
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE = ../..
37
38#
39#	Include common rules.
40#
41include $(UTSBASE)/sun4u/cherrystone/Makefile.cherrystone
42
43def		:=	TARGET= def
44all		:=	TARGET= all
45install		:=	TARGET= install
46install_h	:=	TARGET= install_h
47clean		:=	TARGET= clean
48clobber		:=	TARGET= clobber
49lint		:=	TARGET= lint
50lintlib		:=	TARGET= lintlib
51modlintlib	:=	TARGET= modlintlib
52clean.lint	:=	TARGET= clean.lint
53check		:=	TARGET= check
54
55#
56#	Default build targets.
57#
58.KEEP_STATE:
59
60def all clean.lint clean clobber: $(CHERRYSTONE_KMODS)
61
62modlintlib:	$(CHERRYSTONE_KMODS)
63
64IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire-480R
65
66LINKED_PLATFORMS	= SUNW,Sun-Fire-V490
67
68# EXPORT DELETE START
69#
70# aes256 is delivered in the SUNWcryr package which is removed
71# from the EXPORT_SRC build.
72#
73CHERRYSTONE_CRYPTO_LINKS	+= aes256
74# EXPORT DELETE END
75
76install: 	$(ROOT_CHERRYSTONE_DIR) $(USR_CHERRYSTONE_DIR) \
77		$(USR_CHERRYSTONE_INC_DIR) \
78		$(USR_CHERRYSTONE_SBIN_DIR) \
79		$(USR_CHERRYSTONE_LIB_DIR) \
80		$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
81		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib) \
82		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/include) \
83		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/sbin) \
84		$(CHERRYSTONE_CRYPTO_LINKS) \
85		.WAIT $(CHERRYSTONE_KMODS)
86
87install_h check:	FRC
88	@cd sys; pwd; $(MAKE) $(TARGET)
89
90$(CHERRYSTONE_CRYPTO_LINKS): $(ROOT_CHERRYSTONE_CRYPTO_DIR_64)
91	-$(RM) $(ROOT_CHERRYSTONE_CRYPTO_DIR_64)/$@;
92	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ \
93	    $(ROOT_CHERRYSTONE_CRYPTO_DIR_64)/$@
94
95lint:		modlintlib
96
97LINT_LIBS	 = $(LINT_LIB) \
98		   -L$(CHERRYSTONE_LINT_LIB_DIR) \
99		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
100		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
101
102lint.platmod:   modlintlib
103	@-$(ECHO) "\nCherrystone Platform-dependent module: global crosschecks:"
104	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
105
106$(CHERRYSTONE_KMODS):	FRC
107	@cd $@; pwd; $(MAKE) $(TARGET)
108
109# EXPORT DELETE START
110
111EXPORT_SRC:
112	$(RM) Makefile+
113	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
114	    < Makefile > Makefile+
115	$(MV) Makefile+ Makefile
116	$(CHMOD) 444 Makefile
117
118# EXPORT DELETE END
119
120#
121#
122#	Include common targets.
123#
124include $(UTSBASE)/sun4u/cherrystone/Makefile.targ
125