xref: /titanic_50/usr/src/uts/sun4u/montecarlo/Makefile (revision bde3d612a7c090234c60e6e4578821237a5db135)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#     This makefile drives the production of all MonteCarlo system
26#     dependent modules for the sun4u architecture.
27#
28
29#
30#	Path to the base of the uts directory tree (usually /usr/src/uts).
31#
32UTSBASE		= ../..
33
34#
35#	Include common rules.
36#
37include $(UTSBASE)/sun4u/montecarlo/Makefile.montecarlo
38
39def		:=	TARGET= def
40all		:=	TARGET= all
41install		:=	TARGET= install
42install_h	:=	TARGET= install_h
43clean		:=	TARGET= clean
44clobber		:=	TARGET= clobber
45lint		:=	TARGET= lint
46#lintlib	:=	TARGET= lintlib
47modlintlib	:=	TARGET= modlintlib
48modlist		:=	TARGET= modlist
49modlist		:=	NO_STATE= -K $$MODSTATE$$$$
50clean.lint	:=	TARGET= clean.lint
51check		:=	TARGET= check
52
53#
54#	Default build targets.
55#
56.KEEP_STATE:
57
58def all clean.lint clean clobber modlist: $(MONTECARLO_KMODS)
59
60modlintlib:	$(MONTECARLO_KMODS)
61
62install:        $(ROOT_MONTECARLO_DIR) $(USR_MONTECARLO_DIR) \
63                $(USR_MONTECARLO_INC_DIR) \
64                $(USR_MONTECARLO_SBIN_DIR) \
65                $(USR_MONTECARLO_LIB_DIR) \
66                .WAIT $(MONTECARLO_KMODS) \
67		se.conf ttymux.conf
68
69se.conf:	$(ROOT_MONTECARLO_DRV_DIR)
70		-@$(RM) $(ROOT_MONTECARLO_DRV_DIR)/$@
71		$(CP) $(UTSBASE)/sun4u/montecarlo/io/$@ \
72		$(ROOT_MONTECARLO_DRV_DIR)/$@
73		$(CHMOD) $(CFILEMODE) $(ROOT_MONTECARLO_DRV_DIR)/$@
74
75ttymux.conf:	$(ROOT_MONTECARLO_DRV_DIR)
76		-@$(RM) $(ROOT_MONTECARLO_DRV_DIR)/$@
77		$(CP) $(UTSBASE)/sun4u/montecarlo/io/$@ \
78		$(ROOT_MONTECARLO_DRV_DIR)/$@
79		$(CHMOD) $(CFILEMODE) $(ROOT_MONTECARLO_DRV_DIR)/$@
80
81install_h check:	FRC
82	@cd sys; pwd; $(MAKE) $(TARGET)
83
84lint:		modlintlib
85
86#
87# The 'lint.platmod' target lints the montecarlo platform module against
88# the sun4u kernel.  This ends up doing all the kernel cross-checks,
89# so it takes a couple of minutes.
90# Due to the low ROI, it's not run by default, but it's a good
91# idea to run this if you change os/montecarlo.c.
92#
93LINT_LIBS	 = $(LINT_LIB) \
94		   -L$(MONTECARLO_LINT_LIB_DIR) \
95		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
96		       $(CLOSED_LINT_KMODS:%=-l%) \
97		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
98
99lint.platmod:   modlintlib
100	@-$(ECHO) "\nMonteCarlo Platform-dependent module: global crosschecks:"
101	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
102
103$(MONTECARLO_KMODS): FRC
104	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
105
106#
107#	Include common targets.
108#
109include $(UTSBASE)/sun4u/montecarlo/Makefile.targ
110