xref: /titanic_41/usr/src/uts/sun4u/opl/Makefile (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
125cf1a30Sjl139090#
225cf1a30Sjl139090# CDDL HEADER START
325cf1a30Sjl139090#
425cf1a30Sjl139090# The contents of this file are subject to the terms of the
525cf1a30Sjl139090# Common Development and Distribution License (the "License").
625cf1a30Sjl139090# You may not use this file except in compliance with the License.
725cf1a30Sjl139090#
825cf1a30Sjl139090# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
925cf1a30Sjl139090# or http://www.opensolaris.org/os/licensing.
1025cf1a30Sjl139090# See the License for the specific language governing permissions
1125cf1a30Sjl139090# and limitations under the License.
1225cf1a30Sjl139090#
1325cf1a30Sjl139090# When distributing Covered Code, include this CDDL HEADER in each
1425cf1a30Sjl139090# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1525cf1a30Sjl139090# If applicable, add the following below this CDDL HEADER, with the
1625cf1a30Sjl139090# fields enclosed by brackets "[]" replaced with your own identifying
1725cf1a30Sjl139090# information: Portions Copyright [yyyy] [name of copyright owner]
1825cf1a30Sjl139090#
1925cf1a30Sjl139090# CDDL HEADER END
2025cf1a30Sjl139090#
2125cf1a30Sjl139090#
22*1e49577aSRod Evans# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
2325cf1a30Sjl139090#
2425cf1a30Sjl139090#	This makefile drives the production of the sun4u opl platform
2525cf1a30Sjl139090#	module.
2625cf1a30Sjl139090#
2725cf1a30Sjl139090#	sun4u opl implementation architecture dependent
2825cf1a30Sjl139090#
2925cf1a30Sjl139090# uts/sun4u/opl/Makefile
3025cf1a30Sjl139090
3125cf1a30Sjl139090#
3225cf1a30Sjl139090#	Path to the base of the uts directory tree (usually /usr/src/uts).
3325cf1a30Sjl139090#
3425cf1a30Sjl139090UTSBASE	= ../..
3525cf1a30Sjl139090
3625cf1a30Sjl139090#
3725cf1a30Sjl139090#       Include common rules.
3825cf1a30Sjl139090#
3925cf1a30Sjl139090include $(UTSBASE)/sun4u/opl/Makefile.opl
4025cf1a30Sjl139090
4125cf1a30Sjl139090def		:=	TARGET= def
4225cf1a30Sjl139090all		:=	TARGET= all
4325cf1a30Sjl139090install		:=	TARGET= install
4425cf1a30Sjl139090install_h	:=	TARGET= install_h
4525cf1a30Sjl139090clean		:=	TARGET= clean
4625cf1a30Sjl139090clobber		:=	TARGET= clobber
4725cf1a30Sjl139090lint		:=	TARGET= lint
4825cf1a30Sjl139090lintlib		:=	TARGET= lintlib
4925cf1a30Sjl139090modlist		:=	TARGET= modlist
5025cf1a30Sjl139090modlist		:=	NO_STATE= -K $$MODSTATE$$$$
5125cf1a30Sjl139090modlintlib	:=	TARGET= modlintlib
5225cf1a30Sjl139090clean.lint	:=	TARGET= clean.lint
5325cf1a30Sjl139090check		:=	TARGET= check
5425cf1a30Sjl139090
5525cf1a30Sjl139090#
5625cf1a30Sjl139090#	Default build targets.
5725cf1a30Sjl139090#
5825cf1a30Sjl139090.KEEP_STATE:
5925cf1a30Sjl139090
6025cf1a30Sjl139090def all clean clobber clean.lint: genassym unix .WAIT \
617b77b017Sjimand		$(OPL_CPU_KMODS) $(OPL_KMODS) $(CLOSED_OPL_KMODS)
6225cf1a30Sjl139090
637b77b017Sjimandmodlist:	unix $(OPL_CPU_KMODS) $(OPL_KMODS) $(CLOSED_OPL_KMODS)
6425cf1a30Sjl139090
6525cf1a30Sjl139090lintlib:	unix
6625cf1a30Sjl139090
677b77b017Sjimandmodlintlib:	$(OPL_KMODS) $(CLOSED_OPL_KMODS)
6825cf1a30Sjl139090
6925cf1a30Sjl139090IMPLEMENTED_PLATFORM	= SUNW,SPARC-Enterprise
7025cf1a30Sjl139090
7125cf1a30Sjl139090install: $(ROOT_OPL_DIR) $(USR_OPL_DIR) \
7225cf1a30Sjl139090	$(USR_OPL_INC_DIR) \
7325cf1a30Sjl139090	$(USR_OPL_SBIN_DIR) \
7425cf1a30Sjl139090	$(USR_OPL_SBIN_PRTDIAG) \
7525cf1a30Sjl139090	$(USR_OPL_SBIN_FRUADM) \
7625cf1a30Sjl139090	$(USR_OPL_LIB_DIR) \
7725cf1a30Sjl139090	$(OPL_CRYPTO_LINKS) \
7825cf1a30Sjl139090	genassym unix .WAIT $(OPL_CPU_KMODS) $(OPL_KMODS) \
797b77b017Sjimand	$(CLOSED_OPL_KMODS) $(OPLMSU_OPTION)
8025cf1a30Sjl139090
8125cf1a30Sjl139090genassym unix $(OPL_KMODS) $(OPL_CPU_KMODS): FRC
8225cf1a30Sjl139090	@cd $@; pwd; $(MAKE) $(TARGET)
8325cf1a30Sjl139090
847b77b017Sjimand$(CLOSED_OPL_KMODS): FRC
857b77b017Sjimand	cd $(CLOSED)/uts/sun4u/opl/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
867b77b017Sjimand
8725cf1a30Sjl139090$(OPL_CRYPTO_LINKS): $(ROOT_OPL_CRYPTO_DIR_64)
8825cf1a30Sjl139090	-$(RM) $(ROOT_OPL_CRYPTO_DIR_64)/$@
8925cf1a30Sjl139090	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ $(ROOT_OPL_CRYPTO_DIR_64)/$@
9025cf1a30Sjl139090
9125cf1a30Sjl139090$(OPLMSU_OPTION):	FRC
9225cf1a30Sjl139090	@cd $@; pwd; $(MAKE) $(TARGET)
9325cf1a30Sjl139090
9425cf1a30Sjl139090install_h check:	FRC
9525cf1a30Sjl139090	@cd sys; pwd; $(MAKE) $(TARGET)
9625cf1a30Sjl139090
9725cf1a30Sjl139090lint:	modlintlib
9825cf1a30Sjl139090
9925cf1a30Sjl139090
10025cf1a30Sjl139090#
10125cf1a30Sjl139090# The 'lint.platmod' target lints the opl platform module against
10225cf1a30Sjl139090# the sun4u kernel.  This ends up doing all the kernel cross-checks,
10325cf1a30Sjl139090# so it takes a couple of minutes.
10425cf1a30Sjl139090# Due to the low ROI, it's not run by default, but it's a good
10525cf1a30Sjl139090# idea to run this if you change os/opl.c.
10625cf1a30Sjl139090#
10725cf1a30Sjl139090
10825cf1a30Sjl139090LINT_LIBS	= $(LINT_LIB) \
10925cf1a30Sjl139090		  -L$(OPL_LINT_LIB_DIR) \
11025cf1a30Sjl139090		  -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
1117b77b017Sjimand		      $(CLOSED_LINT_KMODS:%=-l%) \
11225cf1a30Sjl139090		  -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
11325cf1a30Sjl139090
11425cf1a30Sjl139090lint.platmod:   modlintlib
11525cf1a30Sjl139090	@-$(ECHO) "\nOpl Platform-dependent module: global crosschecks:"
11625cf1a30Sjl139090	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
11725cf1a30Sjl139090
11825cf1a30Sjl139090#
11925cf1a30Sjl139090#
12025cf1a30Sjl139090#	Include common targets.
12125cf1a30Sjl139090#
12225cf1a30Sjl139090include $(UTSBASE)/sun4u/opl/Makefile.targ
123