xref: /titanic_41/usr/src/uts/sun4u/makaha/Makefile (revision d24234c24aeaca4ca56ee3ac2794507968f274c4)
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# uts/sun4u/makaha/Makefile
26#
27#     This makefile drives the production of all Makaha system
28#     dependent modules for the sun4u architecture.
29#
30
31#
32#	Path to the base of the uts directory tree (usually /usr/src/uts).
33#
34UTSBASE		= ../..
35
36#
37#	Include common rules.
38#
39include $(UTSBASE)/sun4u/makaha/Makefile.makaha
40
41def		:=	TARGET= def
42all		:=	TARGET= all
43install		:=	TARGET= install
44install_h	:=	TARGET= install_h
45clean		:=	TARGET= clean
46clobber		:=	TARGET= clobber
47lint		:=	TARGET= lint
48lintlib		:=	TARGET= lintlib
49modlintlib	:=	TARGET= modlintlib
50modlist		:=	TARGET= modlist
51modlist		:=	NO_STATE= -K $$MODSTATE$$$$
52clean.lint	:=	TARGET= clean.lint
53check		:=	TARGET= check
54
55#
56#	Default build targets.
57#
58.KEEP_STATE:
59
60def all clean.lint clean clobber modlist: $(MAKAHA_KMODS)
61
62modlintlib:	$(MAKAHA_KMODS)
63
64install:        $(ROOT_MAKAHA_DIR) $(USR_MAKAHA_DIR) \
65				$(USR_MAKAHA_INC_DIR) \
66				$(USR_MAKAHA_SBIN_DIR) \
67				$(USR_MAKAHA_LIB_DIR) \
68				$(ROOT_SPUTNIK_DIR) $(USR_SPUTNIK_DIR) \
69				$(USR_SPUTNIK_INC_DIR) \
70				$(USR_SPUTNIK_SBIN_DIR) \
71				$(USR_SPUTNIK_LIB_DIR) \
72				.WAIT $(MAKAHA_KMODS) \
73				scsb acebus pcf8574 \
74				acebus.conf se.conf scsb.conf \
75				ttymux_dacf ttymux.conf
76
77acebus.conf:	$(ROOT_MAKAHA_DRV_DIR)
78		-@$(RM) $(ROOT_MAKAHA_DRV_DIR)/$@
79		$(CP) $(UTSBASE)/sun4u/makaha/io/$@ \
80		$(ROOT_MAKAHA_DRV_DIR)/$@
81		$(CHMOD) $(CFILEMODE) $(ROOT_MAKAHA_DRV_DIR)/$@
82
83pcf8574:	$(ROOT_MAKAHA_DRV_DIR_64)
84		-@$(RM) $(ROOT_MAKAHA_DRV_DIR_64)/$@
85		$(SYMLINK) $(ROOT_MAKAHA_DRV_LINK_64)/$@ \
86		$(ROOT_MAKAHA_DRV_DIR_64)/$@
87
88acebus:	$(ROOT_MAKAHA_DRV_DIR_64)
89		-@$(RM) $(ROOT_MAKAHA_DRV_DIR_64)/$@
90		$(SYMLINK) $(ROOT_MAKAHA_DRV_LINK_64)/$@ \
91		$(ROOT_MAKAHA_DRV_DIR_64)/$@
92
93scsb:	$(ROOT_MAKAHA_DRV_DIR_64)
94		-@$(RM) $(ROOT_MAKAHA_DRV_DIR_64)/$@
95		$(SYMLINK) $(ROOT_MAKAHA_DRV_LINK_64)/$@ \
96		$(ROOT_MAKAHA_DRV_DIR_64)/$@
97
98scsb.conf:	$(ROOT_MAKAHA_DRV_DIR)
99		-@$(RM) $(ROOT_MAKAHA_DRV_DIR)/$@
100		$(SYMLINK) $(ROOT_MAKAHA_DRV_LINK)/$@ \
101		$(ROOT_MAKAHA_DRV_DIR)/$@
102
103se.conf:	$(ROOT_MAKAHA_DRV_DIR)
104		-@$(RM) $(ROOT_MAKAHA_DRV_DIR)/$@
105		$(SYMLINK) $(ROOT_MAKAHA_DRV_LINK)/$@ \
106		$(ROOT_MAKAHA_DRV_DIR)/$@
107
108ttymux_dacf:	$(ROOT_MAKAHA_DACF_DIR_64) \
109		$(ROOT_SPUTNIK_DACF_DIR_64)
110		-@$(RM) $(ROOT_MAKAHA_DACF_DIR_64)/$@
111		-@$(RM) $(ROOT_SPUTNIK_DACF_DIR_64)/$@
112		$(SYMLINK) $(ROOT_MAKAHA_DACF_LINK_64)/$@ \
113		$(ROOT_MAKAHA_DACF_DIR_64)/$@
114		$(SYMLINK) $(ROOT_SPUTNIK_DACF_LINK_64)/$@ \
115		$(ROOT_SPUTNIK_DACF_DIR_64)/$@
116
117
118ttymux.conf:	$(ROOT_MAKAHA_DRV_DIR) \
119		$(ROOT_SPUTNIK_DRV_DIR)
120		-@$(RM) $(ROOT_MAKAHA_DRV_DIR)/$@
121		-@$(RM) $(ROOT_SPUTNIK_DRV_DIR)/$@
122		$(SYMLINK) $(ROOT_MAKAHA_DRV_LINK)/$@ \
123		$(ROOT_MAKAHA_DRV_DIR)/$@
124		$(SYMLINK) $(ROOT_MAKAHA_DRV_LINK)/$@ \
125		$(ROOT_SPUTNIK_DRV_DIR)/$@
126
127install_h check:
128
129lint:		modlintlib
130
131#
132# The 'lint.platmod' target lints the makaha platform module against
133# the sun4u kernel.  This ends up doing all the kernel cross-checks,
134# so it takes a couple of minutes.
135# Due to the low ROI, it's not run by default, but it's a good
136# idea to run this if you change os/makaha.c.
137#
138LINT_LIBS	 = $(LINT_LIB) \
139		   -L$(MAKAHA_LINT_LIB_DIR) \
140		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
141		       $(CLOSED_LINT_KMODS:%=-l%) \
142		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
143
144lint.platmod:   modlintlib
145	@-$(ECHO) "\nMakaha Platform-dependent module: global crosschecks:"
146	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
147
148$(MAKAHA_KMODS): FRC
149	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
150
151#
152#	Include common targets.
153#
154include $(UTSBASE)/sun4u/makaha/Makefile.targ
155