xref: /titanic_41/usr/src/uts/sun4u/starcat/Makefile (revision 4c0312813f96388b6ce9453c99f2db7d6a393bd4)
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#pragma ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#
28#	This makefile drives the production of the sun4u starcat platform
29#	module.
30#
31#	sun4u starcat 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)/sun4u/starcat/Makefile.starcat
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: genassym unix .WAIT \
64		$(STARCAT_CPU_KMODS) $(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS)
65
66modlist:	unix \
67		$(STARCAT_CPU_KMODS) $(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS)
68
69lintlib:	unix
70
71modlintlib:	$(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS)
72
73IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire-15000
74
75# EXPORT DELETE START
76#
77# aes256 is delivered in the SUNWcryr package which is removed from
78# the EXPORT_SRC build.
79#
80STARCAT_CRYPTO_LINKS	+= aes256
81# EXPORT DELETE END
82
83install: $(ROOT_STARCAT_DIR) $(USR_STARCAT_DIR) \
84	$(USR_STARCAT_INC_DIR) \
85	$(USR_STARCAT_SBIN_DIR) \
86	$(USR_STARCAT_LIB_DIR) \
87	$(STARCAT_CRYPTO_LINKS) \
88	genassym unix .WAIT $(STARCAT_CPU_KMODS) \
89	$(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS)
90
91genassym unix $(STARCAT_KMODS) $(STARCAT_CPU_KMODS): FRC
92	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
93
94$(CLOSED_STARCAT_KMODS): FRC
95	cd $(CLOSED)/uts/sun4u/starcat/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
96
97
98$(STARCAT_CRYPTO_LINKS): $(ROOT_STARCAT_CRYPTO_DIR_64)
99	-$(RM) $(ROOT_STARCAT_CRYPTO_DIR_64)/$@;
100	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_STARCAT_CRYPTO_DIR_64)/$@
101
102install_h check:	FRC
103	@cd sys; pwd; $(MAKE) $(TARGET)
104
105lint:	modlintlib
106
107
108#
109# The 'lint.platmod' target lints the starcat platform module against
110# the sun4u kernel.  This ends up doing all the kernel cross-checks,
111# so it takes a couple of minutes.
112# Due to the low ROI, it's not run by default, but it's a good
113# idea to run this if you change os/starcat.c.
114#
115
116LINT_LIBS	= $(LINT_LIB) \
117		  -L$(STARCAT_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) "\nStarcat 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/starcat/Makefile.targ
142