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