xref: /titanic_50/usr/src/uts/sun4u/starcat/Makefile (revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0)
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# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#pragma ident	"%Z%%M%	%I%	%E% SMI"
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)
65
66modlist:	unix \
67		$(STARCAT_CPU_KMODS) $(STARCAT_KMODS)
68
69lintlib:	unix
70
71modlintlib:	$(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)
90
91genassym unix $(STARCAT_KMODS) $(STARCAT_CPU_KMODS): FRC
92	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
93
94$(STARCAT_CRYPTO_LINKS): $(ROOT_STARCAT_CRYPTO_DIR_64)
95	-$(RM) $(ROOT_STARCAT_CRYPTO_DIR_64)/$@;
96	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_STARCAT_CRYPTO_DIR_64)/$@
97
98install_h check:	FRC
99	@cd sys; pwd; $(MAKE) $(TARGET)
100
101lint:	modlintlib
102
103
104#
105# The 'lint.platmod' target lints the starcat platform module against
106# the sun4u kernel.  This ends up doing all the kernel cross-checks,
107# so it takes a couple of minutes.
108# Due to the low ROI, it's not run by default, but it's a good
109# idea to run this if you change os/starcat.c.
110#
111
112LINT_LIBS	= $(LINT_LIB) \
113		  -L$(STARCAT_LINT_LIB_DIR) \
114		  -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
115		      $(CLOSED_LINT_KMODS:%=-l%) \
116		  -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
117
118lint.platmod:   modlintlib
119	@-$(ECHO) "\nStarcat Platform-dependent module: global crosschecks:"
120	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
121
122# EXPORT DELETE START
123
124EXPORT_SRC:
125	$(RM) Makefile+
126	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
127	    < Makefile > Makefile+
128	$(MV) Makefile+ Makefile
129	$(CHMOD) 444 Makefile
130
131# EXPORT DELETE END
132
133#
134#
135#	Include common targets.
136#
137include $(UTSBASE)/sun4u/starcat/Makefile.targ
138