xref: /titanic_41/usr/src/uts/sun4u/starcat/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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 2000-2003 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
53clean.lint	:=	TARGET= clean.lint
54check		:=	TARGET= check
55
56#
57#	Default build targets.
58#
59.KEEP_STATE:
60
61def all clean clobber clean.lint: genassym unix .WAIT \
62		$(STARCAT_CPU_KMODS) $(STARCAT_KMODS)
63
64lintlib:	unix
65
66modlintlib:	$(STARCAT_KMODS)
67
68IMPLEMENTED_PLATFORM	= SUNW,Sun-Fire-15000
69
70# EXPORT DELETE START
71#
72# aes256 is delivered in the SUNWcryr package which is removed from
73# the EXPORT_SRC build.
74#
75STARCAT_CRYPTO_LINKS	+= aes256
76# EXPORT DELETE END
77
78install: $(ROOT_STARCAT_DIR) $(USR_STARCAT_DIR) \
79	$(USR_STARCAT_INC_DIR) \
80	$(USR_STARCAT_SBIN_DIR) \
81	$(USR_STARCAT_LIB_DIR) \
82	$(STARCAT_CRYPTO_LINKS) \
83	genassym unix .WAIT $(STARCAT_CPU_KMODS) $(STARCAT_KMODS) pcicfg
84
85pcicfg:		$(ROOT_PSM_MISC_DIR_64)/pcicfg.e
86		-@$(RM) $(ROOT_STARCAT_MISC_DIR_64)/$@
87		$(SYMLINK) ../../../../sun4u/kernel/misc/sparcv9/pcicfg.e \
88		$(ROOT_STARCAT_MISC_DIR_64)/$@
89
90genassym unix $(STARCAT_KMODS) $(STARCAT_CPU_KMODS): FRC
91	@cd $@; pwd; $(MAKE) $(TARGET)
92
93$(STARCAT_CRYPTO_LINKS): $(ROOT_STARCAT_CRYPTO_DIR_64)
94	-$(RM) $(ROOT_STARCAT_CRYPTO_DIR_64)/$@;
95	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_STARCAT_CRYPTO_DIR_64)/$@
96
97install_h check:	FRC
98	@cd sys; pwd; $(MAKE) $(TARGET)
99
100lint:	modlintlib
101
102
103#
104# The 'lint.platmod' target lints the montecarlo platform module against
105# the sun4u kernel.  This ends up doing all the kernel cross-checks,
106# so it takes a couple of minutes.
107# Due to the low ROI, it's not run by default, but it's a good
108# idea to run this if you change os/starcat.c.
109#
110
111LINT_LIBS	= $(LINT_LIB) \
112		  -L$(STARCAT_LINT_LIB_DIR) \
113		  -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
114		  -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
115
116lint.platmod:   modlintlib
117	@-$(ECHO) "\nStarcat Platform-dependent module: global crosschecks:"
118	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
119
120# EXPORT DELETE START
121
122EXPORT_SRC:
123	$(RM) Makefile+
124	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
125	    < Makefile > Makefile+
126	$(MV) Makefile+ Makefile
127	$(CHMOD) 444 Makefile
128
129# EXPORT DELETE END
130
131#
132#
133#	Include common targets.
134#
135include $(UTSBASE)/sun4u/starcat/Makefile.targ
136