xref: /titanic_50/usr/src/uts/sun4u/lw8/Makefile (revision d6114e2d100d9ec3b45f9968d45ac2e3a0827af0)
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 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#	This makefile drives the production of the sun4u lw8 platform
27#	module.
28#
29#	sun4u implementation architecture dependent
30#
31
32#
33#	Path to the base of the uts directory tree (usually /usr/src/uts).
34#
35UTSBASE = ../..
36
37#
38#	Include common rules.
39#
40include $(UTSBASE)/sun4u/lw8/Makefile.lw8
41
42def		:=	TARGET= def
43all		:=	TARGET= all
44install		:=	TARGET= install
45install_h	:=	TARGET= install_h
46clean		:=	TARGET= clean
47clobber		:=	TARGET= clobber
48lint		:=	TARGET= lint
49lintlib		:=	TARGET= lintlib
50modlintlib	:=	TARGET= modlintlib
51modlist		:=	TARGET= modlist
52modlist		:=	NO_STATE= -K $$MODSTATE$$$$
53clean.lint	:=	TARGET= clean.lint
54check		:=	TARGET= check
55
56#
57#	Default build targets.
58#
59.KEEP_STATE:
60
61def all clean clean.lint clobber modlist: $(LW8_KMODS)
62
63lintlib:	unix
64
65modlintlib:	$(LW8_KMODS)
66
67IMPLEMENTED_PLATFORM	= SUNW,Netra-T12
68LINKS2DESTDIR	= ../../SUNW,Sun-Fire/kernel
69LINKS3DESTDIR	= ../../../../SUNW,Sun-Fire/kernel/drv/sparcv9
70LINKS4DESTDIR	= ../../../../SUNW,Sun-Fire/kernel/misc/sparcv9
71LW8_LINKS_2     = SUNW,Netra-T12/kernel/cpu
72LW8_LINKS_2	+= SUNW,Netra-T12/kernel/sparcv9
73LW8_LINKS_3	= SUNW,Netra-T12/kernel/drv/sparcv9/sgcn
74LW8_LINKS_3	+= SUNW,Netra-T12/kernel/drv/sparcv9/sgsbbc
75LW8_LINKS_3	+= SUNW,Netra-T12/kernel/drv/sparcv9/ssm
76LW8_LINKS_4	= SUNW,Netra-T12/kernel/misc/sparcv9/sbdp
77LW8_PLAT_LINKS_2  = $(LW8_LINKS_2:%=$(ROOT_PLAT_DIR)/%)
78LW8_PLAT_LINKS_3  = $(LW8_LINKS_3:%=$(ROOT_PLAT_DIR)/%)
79LW8_PLAT_LINKS_4  = $(LW8_LINKS_4:%=$(ROOT_PLAT_DIR)/%)
80
81install:	$(ROOT_LW8_DIR) $(USR_LW8_DIR) \
82		$(USR_LW8_INC_DIR) \
83		$(USR_LW8_SBIN_DIR) \
84		$(USR_LW8_LIB_DIR) \
85		.WAIT $(LW8_KMODS) \
86		$(LW8_PLAT_LINKS_2) \
87		$(LW8_PLAT_LINKS_3) \
88		$(LW8_PLAT_LINKS_4) \
89		$(LW8_CRYPTO_LINKS)
90
91$(LW8_KMODS): FRC
92	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
93
94install_h check:	FRC
95	@cd sys; pwd; $(MAKE) $(TARGET)
96
97
98lint:		modlintlib
99
100LINT_LIBS	 = $(LINT_LIB) \
101		   -L$(LW8_LINT_LIB_DIR) \
102		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
103		       $(CLOSED_LINT_KMODS:%=-l%) \
104		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
105
106$(LW8_PLAT_LINKS_2): $(ROOT_LW8_MOD_DIR)
107	$(RM) $@; $(SYMLINK) $(LINKS2DESTDIR)/$(@F) $@
108
109$(LW8_PLAT_LINKS_3): $(ROOT_LW8_DRV_DIR_64)
110	$(RM) $@; $(SYMLINK) $(LINKS3DESTDIR)/$(@F) $@
111
112$(LW8_PLAT_LINKS_4): $(ROOT_LW8_DRV_DIR_64)
113	$(RM) $@; $(SYMLINK) $(LINKS4DESTDIR)/$(@F) $@
114
115$(LW8_CRYPTO_LINKS): $(ROOT_LW8_CRYPTO_DIR_64)
116	-$(RM) $(ROOT_LW8_CRYPTO_DIR_64)/$@;
117	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_LW8_CRYPTO_DIR_64)/$@
118
119#
120#
121#	Include common targets.
122#
123include $(UTSBASE)/sun4u/lw8/Makefile.targ
124