xref: /titanic_41/usr/src/uts/sun4u/lw8/Makefile (revision 3173664e967186de0a5f0e61548c25996fa6d37f)
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#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28#	This makefile drives the production of the sun4u lw8 platform
29#	module.
30#
31#	sun4u 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/lw8/Makefile.lw8
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 clean.lint clobber modlist: $(LW8_KMODS)
64
65lintlib:	unix
66
67modlintlib:	$(LW8_KMODS)
68
69IMPLEMENTED_PLATFORM	= SUNW,Netra-T12
70LINKS2DESTDIR	= ../../SUNW,Sun-Fire/kernel
71LINKS3DESTDIR	= ../../../../SUNW,Sun-Fire/kernel/drv/sparcv9
72LINKS4DESTDIR	= ../../../../SUNW,Sun-Fire/kernel/misc/sparcv9
73LW8_LINKS_2     = SUNW,Netra-T12/kernel/cpu
74LW8_LINKS_2	+= SUNW,Netra-T12/kernel/sparcv9
75LW8_LINKS_3	= SUNW,Netra-T12/kernel/drv/sparcv9/sgcn
76LW8_LINKS_3	+= SUNW,Netra-T12/kernel/drv/sparcv9/sgsbbc
77LW8_LINKS_3	+= SUNW,Netra-T12/kernel/drv/sparcv9/ssm
78LW8_LINKS_4	= SUNW,Netra-T12/kernel/misc/sparcv9/sbdp
79LW8_PLAT_LINKS_2  = $(LW8_LINKS_2:%=$(ROOT_PLAT_DIR)/%)
80LW8_PLAT_LINKS_3  = $(LW8_LINKS_3:%=$(ROOT_PLAT_DIR)/%)
81LW8_PLAT_LINKS_4  = $(LW8_LINKS_4:%=$(ROOT_PLAT_DIR)/%)
82
83# EXPORT DELETE START
84#
85# aes256 is delivered in the SUNWcryr package which is removed from
86# the EXPORT_SRC build.
87#
88LW8_CRYPTO_LINKS	+= aes256
89# EXPORT DELETE END
90
91install:	$(ROOT_LW8_DIR) $(USR_LW8_DIR) \
92		$(USR_LW8_INC_DIR) \
93		$(USR_LW8_SBIN_DIR) \
94		$(USR_LW8_LIB_DIR) \
95		.WAIT $(LW8_KMODS) \
96		$(LW8_PLAT_LINKS_2) \
97		$(LW8_PLAT_LINKS_3) \
98		$(LW8_PLAT_LINKS_4) \
99		$(LW8_CRYPTO_LINKS)
100
101$(LW8_KMODS): FRC
102	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
103
104install_h check:	FRC
105	@cd sys; pwd; $(MAKE) $(TARGET)
106
107
108lint:		modlintlib
109
110LINT_LIBS	 = $(LINT_LIB) \
111		   -L$(LW8_LINT_LIB_DIR) \
112		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
113		       $(CLOSED_LINT_KMODS:%=-l%) \
114		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
115
116$(LW8_PLAT_LINKS_2): $(ROOT_LW8_MOD_DIR)
117	$(RM) $@; $(SYMLINK) $(LINKS2DESTDIR)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
118
119$(LW8_PLAT_LINKS_3): $(ROOT_LW8_DRV_DIR_64)
120	$(RM) $@; $(SYMLINK) $(LINKS3DESTDIR)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
121
122$(LW8_PLAT_LINKS_4): $(ROOT_LW8_DRV_DIR_64)
123	$(RM) $@; $(SYMLINK) $(LINKS4DESTDIR)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
124
125$(LW8_CRYPTO_LINKS): $(ROOT_LW8_CRYPTO_DIR_64)
126	-$(RM) $(ROOT_LW8_CRYPTO_DIR_64)/$@;
127	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_LW8_CRYPTO_DIR_64)/$@
128
129# EXPORT DELETE START
130
131EXPORT_SRC:
132	$(RM) Makefile+
133	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
134	    < Makefile > Makefile+
135	$(MV) Makefile+ Makefile
136	$(CHMOD) 444 Makefile
137
138# EXPORT DELETE END
139
140#
141#
142#	Include common targets.
143#
144include $(UTSBASE)/sun4u/lw8/Makefile.targ
145