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