xref: /titanic_41/usr/src/uts/sun4u/serengeti/Makefile (revision fb9f9b975cb9214fec5dab37d461199adab9b964)
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/serengeti/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 the sun4u serengeti platform
30#	module.
31#
32#	sun4u implementation architecture dependent
33#
34
35#
36#	Path to the base of the uts directory tree (usually /usr/src/uts).
37#
38UTSBASE	= ../..
39
40#
41#	Include common rules.
42#
43include $(UTSBASE)/sun4u/serengeti/Makefile.serengeti
44
45def		:=	TARGET= def
46all		:=	TARGET= all
47install		:=	TARGET= install
48install_h	:=	TARGET= install_h
49clean		:=	TARGET= clean
50clobber		:=	TARGET= clobber
51lint		:=	TARGET= lint
52lintlib		:=	TARGET= lintlib
53modlintlib	:=	TARGET= modlintlib
54modlist		:=	TARGET= modlist
55modlist		:=	NO_STATE= -K $$MODSTATE$$$$
56clean.lint	:=	TARGET= clean.lint
57check		:=	TARGET= check
58
59#
60#	Default build targets.
61#
62.KEEP_STATE:
63
64def all clean clean.lint clobber: genassym unix .WAIT \
65	$(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS)
66
67modlist:	unix $(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS)
68
69lintlib:	unix
70
71modlintlib:	$(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS)
72
73IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire
74
75# EXPORT DELETE START
76#
77# aes256 is delivered in the SUNWcryr package which is removed from
78# the EXPORT_SRC build.
79#
80SERENGETI_CRYPTO_LINKS	+= aes256
81# EXPORT DELETE END
82
83install:	$(ROOT_SERENGETI_DIR) $(USR_SERENGETI_DIR) \
84		$(USR_SERENGETI_INC_DIR) \
85		$(USR_SERENGETI_SBIN_DIR) \
86		$(USR_SERENGETI_LIB_DIR) \
87		$(SERENGETI_CRYPTO_LINKS) \
88		genassym unix .WAIT \
89		$(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS) \
90		pcicfg
91
92pcicfg:		$(ROOT_PSM_MISC_DIR_64)/pcicfg.e $(ROOT_SERENGETI_MISC_DIR_64)
93		-@$(RM) $(ROOT_SERENGETI_MISC_DIR_64)/$@
94		$(SYMLINK) ../../../../sun4u/kernel/misc/sparcv9/pcicfg.e \
95		$(ROOT_SERENGETI_MISC_DIR_64)/$@
96
97genassym unix $(SERENGETI_KMODS): FRC
98	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
99
100$(CLOSED_SERENGETI_KMODS): FRC
101	cd $(CLOSED)/uts/sun4u/serengeti/$@; pwd; \
102	    $(MAKE) $(NO_STATE) $(TARGET)
103
104$(SERENGETI_CRYPTO_LINKS): $(ROOT_SERENGETI_CRYPTO_DIR_64)
105	-$(RM) $(ROOT_SERENGETI_CRYPTO_DIR_64)/$@;
106	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_SERENGETI_CRYPTO_DIR_64)/$@
107
108install_h check:	FRC
109	@cd sys; pwd; $(MAKE) $(TARGET)
110
111
112lint:		modlintlib
113
114#
115# The 'lint.platmod' target lints the serengeti platform module against the sun4u
116# kernel.  This ends up doing all the kernel cross-checks, so it takes a couple
117# of minutes.  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/serengeti.c.
119#
120LINT_LIBS	 = $(LINT_LIB) \
121		   -L$(SERENGETI_LINT_LIB_DIR) \
122		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
123		       $(CLOSED_LINT_KMODS:%=-l%) \
124		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
125
126lint.platmod:	modlintlib
127	@-$(ECHO) "\nSerengeti Platform-dependent module: global crosschecks:"
128	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
129
130# EXPORT DELETE START
131
132EXPORT_SRC:
133	$(RM) Makefile+
134	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
135	    < Makefile > Makefile+
136	$(MV) Makefile+ Makefile
137	$(CHMOD) 444 Makefile
138
139# EXPORT DELETE END
140
141#
142#
143#	Include common targets.
144#
145include $(UTSBASE)/sun4u/serengeti/Makefile.targ
146