xref: /titanic_50/usr/src/uts/sun4u/lw8/Makefile (revision 275c9da86e89f8abf71135cf63d9fc23671b2e60)
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 2007 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
83install:	$(ROOT_LW8_DIR) $(USR_LW8_DIR) \
84		$(USR_LW8_INC_DIR) \
85		$(USR_LW8_SBIN_DIR) \
86		$(USR_LW8_LIB_DIR) \
87		.WAIT $(LW8_KMODS) \
88		$(LW8_PLAT_LINKS_2) \
89		$(LW8_PLAT_LINKS_3) \
90		$(LW8_PLAT_LINKS_4) \
91		$(LW8_CRYPTO_LINKS)
92
93$(LW8_KMODS): FRC
94	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
95
96install_h check:	FRC
97	@cd sys; pwd; $(MAKE) $(TARGET)
98
99
100lint:		modlintlib
101
102LINT_LIBS	 = $(LINT_LIB) \
103		   -L$(LW8_LINT_LIB_DIR) \
104		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
105		       $(CLOSED_LINT_KMODS:%=-l%) \
106		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
107
108$(LW8_PLAT_LINKS_2): $(ROOT_LW8_MOD_DIR)
109	$(RM) $@; $(SYMLINK) $(LINKS2DESTDIR)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
110
111$(LW8_PLAT_LINKS_3): $(ROOT_LW8_DRV_DIR_64)
112	$(RM) $@; $(SYMLINK) $(LINKS3DESTDIR)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
113
114$(LW8_PLAT_LINKS_4): $(ROOT_LW8_DRV_DIR_64)
115	$(RM) $@; $(SYMLINK) $(LINKS4DESTDIR)/$(@F) $@ $(CHOWNLINK) $(CHGRPLINK)
116
117$(LW8_CRYPTO_LINKS): $(ROOT_LW8_CRYPTO_DIR_64)
118	-$(RM) $(ROOT_LW8_CRYPTO_DIR_64)/$@;
119	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_LW8_CRYPTO_DIR_64)/$@
120
121#
122#
123#	Include common targets.
124#
125include $(UTSBASE)/sun4u/lw8/Makefile.targ
126