xref: /titanic_41/usr/src/uts/sun4u/cherrystone/Makefile (revision 4b22b9337f359bfd063322244f5336cc7c6ffcfa)
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 2005 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
52modlist		:=	TARGET= modlist
53modlist		:=	NO_STATE= -K $$MODSTATE$$$$
54clean.lint	:=	TARGET= clean.lint
55check		:=	TARGET= check
56
57#
58#	Default build targets.
59#
60.KEEP_STATE:
61
62def all clean.lint clean clobber modlist: $(CHERRYSTONE_KMODS)
63
64modlintlib:	$(CHERRYSTONE_KMODS)
65
66IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire-480R
67
68LINKED_PLATFORMS	= SUNW,Sun-Fire-V490
69
70# EXPORT DELETE START
71#
72# aes256 is delivered in the SUNWcryr package which is removed
73# from the EXPORT_SRC build.
74#
75CHERRYSTONE_CRYPTO_LINKS	+= aes256
76# EXPORT DELETE END
77
78install: 	$(ROOT_CHERRYSTONE_DIR) $(USR_CHERRYSTONE_DIR) \
79		$(USR_CHERRYSTONE_INC_DIR) \
80		$(USR_CHERRYSTONE_SBIN_DIR) \
81		$(USR_CHERRYSTONE_LIB_DIR) \
82		$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
83		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib) \
84		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/include) \
85		$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/sbin) \
86		$(CHERRYSTONE_CRYPTO_LINKS) \
87		.WAIT $(CHERRYSTONE_KMODS)
88
89install_h check:	FRC
90	@cd sys; pwd; $(MAKE) $(TARGET)
91
92$(CHERRYSTONE_CRYPTO_LINKS): $(ROOT_CHERRYSTONE_CRYPTO_DIR_64)
93	-$(RM) $(ROOT_CHERRYSTONE_CRYPTO_DIR_64)/$@;
94	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ \
95	    $(ROOT_CHERRYSTONE_CRYPTO_DIR_64)/$@
96
97lint:		modlintlib
98
99LINT_LIBS	 = $(LINT_LIB) \
100		   -L$(CHERRYSTONE_LINT_LIB_DIR) \
101		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
102		       $(CLOSED_LINT_KMODS:%=-l%) \
103		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
104
105lint.platmod:   modlintlib
106	@-$(ECHO) "\nCherrystone Platform-dependent module: global crosschecks:"
107	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
108
109$(CHERRYSTONE_KMODS):	FRC
110	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
111
112# EXPORT DELETE START
113
114EXPORT_SRC:
115	$(RM) Makefile+
116	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
117	    < Makefile > Makefile+
118	$(MV) Makefile+ Makefile
119	$(CHMOD) 444 Makefile
120
121# EXPORT DELETE END
122
123#
124#
125#	Include common targets.
126#
127include $(UTSBASE)/sun4u/cherrystone/Makefile.targ
128