xref: /titanic_51/usr/src/uts/sun4u/lw8/Makefile (revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4)
103831d35Sstevel#
203831d35Sstevel# CDDL HEADER START
303831d35Sstevel#
403831d35Sstevel# The contents of this file are subject to the terms of the
503831d35Sstevel# Common Development and Distribution License (the "License").
603831d35Sstevel# You may not use this file except in compliance with the License.
703831d35Sstevel#
803831d35Sstevel# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
903831d35Sstevel# or http://www.opensolaris.org/os/licensing.
1003831d35Sstevel# See the License for the specific language governing permissions
1103831d35Sstevel# and limitations under the License.
1203831d35Sstevel#
1303831d35Sstevel# When distributing Covered Code, include this CDDL HEADER in each
1403831d35Sstevel# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1503831d35Sstevel# If applicable, add the following below this CDDL HEADER, with the
1603831d35Sstevel# fields enclosed by brackets "[]" replaced with your own identifying
1703831d35Sstevel# information: Portions Copyright [yyyy] [name of copyright owner]
1803831d35Sstevel#
1903831d35Sstevel# CDDL HEADER END
2003831d35Sstevel#
2103831d35Sstevel
2203831d35Sstevel#
23*24fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2403831d35Sstevel# Use is subject to license terms.
2503831d35Sstevel#
2603831d35Sstevel#	This makefile drives the production of the sun4u lw8 platform
2703831d35Sstevel#	module.
2803831d35Sstevel#
2903831d35Sstevel#	sun4u implementation architecture dependent
3003831d35Sstevel#
3103831d35Sstevel
3203831d35Sstevel#
3303831d35Sstevel#	Path to the base of the uts directory tree (usually /usr/src/uts).
3403831d35Sstevel#
3503831d35SstevelUTSBASE = ../..
3603831d35Sstevel
3703831d35Sstevel#
3803831d35Sstevel#	Include common rules.
3903831d35Sstevel#
4003831d35Sstevelinclude $(UTSBASE)/sun4u/lw8/Makefile.lw8
4103831d35Sstevel
4203831d35Ssteveldef		:=	TARGET= def
4303831d35Sstevelall		:=	TARGET= all
4403831d35Sstevelinstall		:=	TARGET= install
4503831d35Sstevelinstall_h	:=	TARGET= install_h
4603831d35Sstevelclean		:=	TARGET= clean
4703831d35Sstevelclobber		:=	TARGET= clobber
4803831d35Sstevellint		:=	TARGET= lint
4903831d35Sstevellintlib		:=	TARGET= lintlib
5003831d35Sstevelmodlintlib	:=	TARGET= modlintlib
5103831d35Sstevelmodlist		:=	TARGET= modlist
5203831d35Sstevelmodlist		:=	NO_STATE= -K $$MODSTATE$$$$
5303831d35Sstevelclean.lint	:=	TARGET= clean.lint
5403831d35Sstevelcheck		:=	TARGET= check
5503831d35Sstevel
5603831d35Sstevel#
5703831d35Sstevel#	Default build targets.
5803831d35Sstevel#
5903831d35Sstevel.KEEP_STATE:
6003831d35Sstevel
6103831d35Ssteveldef all clean clean.lint clobber modlist: $(LW8_KMODS)
6203831d35Sstevel
6303831d35Sstevellintlib:	unix
6403831d35Sstevel
6503831d35Sstevelmodlintlib:	$(LW8_KMODS)
6603831d35Sstevel
6703831d35SstevelIMPLEMENTED_PLATFORM	= SUNW,Netra-T12
6803831d35SstevelLINKS2DESTDIR	= ../../SUNW,Sun-Fire/kernel
6903831d35SstevelLINKS3DESTDIR	= ../../../../SUNW,Sun-Fire/kernel/drv/sparcv9
7003831d35SstevelLINKS4DESTDIR	= ../../../../SUNW,Sun-Fire/kernel/misc/sparcv9
7103831d35SstevelLW8_LINKS_2     = SUNW,Netra-T12/kernel/cpu
7203831d35SstevelLW8_LINKS_2	+= SUNW,Netra-T12/kernel/sparcv9
7303831d35SstevelLW8_LINKS_3	= SUNW,Netra-T12/kernel/drv/sparcv9/sgcn
7403831d35SstevelLW8_LINKS_3	+= SUNW,Netra-T12/kernel/drv/sparcv9/sgsbbc
7503831d35SstevelLW8_LINKS_3	+= SUNW,Netra-T12/kernel/drv/sparcv9/ssm
7603831d35SstevelLW8_LINKS_4	= SUNW,Netra-T12/kernel/misc/sparcv9/sbdp
7703831d35SstevelLW8_PLAT_LINKS_2  = $(LW8_LINKS_2:%=$(ROOT_PLAT_DIR)/%)
7803831d35SstevelLW8_PLAT_LINKS_3  = $(LW8_LINKS_3:%=$(ROOT_PLAT_DIR)/%)
7903831d35SstevelLW8_PLAT_LINKS_4  = $(LW8_LINKS_4:%=$(ROOT_PLAT_DIR)/%)
8003831d35Sstevel
8103831d35Sstevelinstall:	$(ROOT_LW8_DIR) $(USR_LW8_DIR) \
8203831d35Sstevel		$(USR_LW8_INC_DIR) \
8303831d35Sstevel		$(USR_LW8_SBIN_DIR) \
8403831d35Sstevel		$(USR_LW8_LIB_DIR) \
8503831d35Sstevel		.WAIT $(LW8_KMODS) \
8603831d35Sstevel		$(LW8_PLAT_LINKS_2) \
8703831d35Sstevel		$(LW8_PLAT_LINKS_3) \
8803831d35Sstevel		$(LW8_PLAT_LINKS_4) \
8903831d35Sstevel		$(LW8_CRYPTO_LINKS)
9003831d35Sstevel
9103831d35Sstevel$(LW8_KMODS): FRC
9203831d35Sstevel	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
9303831d35Sstevel
9403831d35Sstevelinstall_h check:	FRC
9503831d35Sstevel	@cd sys; pwd; $(MAKE) $(TARGET)
9603831d35Sstevel
9703831d35Sstevel
9803831d35Sstevellint:		modlintlib
9903831d35Sstevel
10003831d35SstevelLINT_LIBS	 = $(LINT_LIB) \
10103831d35Sstevel		   -L$(LW8_LINT_LIB_DIR) \
10203831d35Sstevel		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
10303831d35Sstevel		       $(CLOSED_LINT_KMODS:%=-l%) \
10403831d35Sstevel		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
10503831d35Sstevel
10603831d35Sstevel$(LW8_PLAT_LINKS_2): $(ROOT_LW8_MOD_DIR)
107*24fe0b3bSjmcp	$(RM) $@; $(SYMLINK) $(LINKS2DESTDIR)/$(@F) $@
10803831d35Sstevel
10903831d35Sstevel$(LW8_PLAT_LINKS_3): $(ROOT_LW8_DRV_DIR_64)
110*24fe0b3bSjmcp	$(RM) $@; $(SYMLINK) $(LINKS3DESTDIR)/$(@F) $@
11103831d35Sstevel
11203831d35Sstevel$(LW8_PLAT_LINKS_4): $(ROOT_LW8_DRV_DIR_64)
113*24fe0b3bSjmcp	$(RM) $@; $(SYMLINK) $(LINKS4DESTDIR)/$(@F) $@
11403831d35Sstevel
11503831d35Sstevel$(LW8_CRYPTO_LINKS): $(ROOT_LW8_CRYPTO_DIR_64)
11603831d35Sstevel	-$(RM) $(ROOT_LW8_CRYPTO_DIR_64)/$@;
11703831d35Sstevel	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_LW8_CRYPTO_DIR_64)/$@
11803831d35Sstevel
11903831d35Sstevel#
12003831d35Sstevel#
12103831d35Sstevel#	Include common targets.
12203831d35Sstevel#
12303831d35Sstevelinclude $(UTSBASE)/sun4u/lw8/Makefile.targ
124