xref: /titanic_44/usr/src/psm/stand/boot/Makefile (revision 2ec7cc7fc084163eaed884efee9bbd322cc8951b)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28include		../../../Makefile.master
29
30sparcv9_ARCHITECTURES = sparcv9
31sparc_ARCHITECTURES = $(sparcv9_ARCHITECTURES)
32
33SUBDIRS = $($(MACH)_ARCHITECTURES)
34
35all		:=	TARGET= all
36install		:=	TARGET= install
37clean		:=	TARGET= clean
38clobber		:=	TARGET= clobber
39lint		:=	TARGET= lint
40
41.KEEP_STATE:
42
43all install lint clean: $(SUBDIRS)
44
45clobber: $(SUBDIRS)
46	$(RM) make.out lint.out
47
48$(SUBDIRS): FRC
49	@cd $@; pwd; $(MAKE) $(TARGET)
50
51#
52# Cross-reference customization: include all boot-related source files.
53#
54UTSDIR =	../../../uts
55UTSCLOSED =	../../../../closed/uts
56STANDLIBDIR =	../../../stand/lib
57STANDSYSDIRS =	../../../stand/sys
58PROMDIRS =	../../promif
59NAMESDIRS =	../lib/names
60XRDIRS += 	$(STANDLIBDIR) $(STANDSYSDIRS) $(PROMDIRS) $(NAMESDIRS)
61
62#
63# Components beginning with B! are in the open and closed trees; those
64# beginning with O! are just in the open tree.
65#
66XRINCCOMP = B!sun4u O!sfmmu O!sparc/v7 O!sparc/v9 B!sparc B!sun B!common
67XRINC_TMP = $(XRINCCOMP:B!%=$(UTSDIR)/%)
68XRINCDIRS = $(XRINC_TMP:O!%=$(UTSDIR)/%)
69$(CLOSED_BUILD)XRINC_TMP = $(XRINCCOMP:B!%=$(UTSDIR)/% $(UTSCLOSED)/%)
70$(CLOSED_BUILD)XRINCDIRS = $(XRINC_TMP:O!%=$(UTSDIR)/%)
71
72cscope.out tags: FRC
73	$(XREF) -x $@
74
75FRC:
76
77# EXPORT DELETE START
78EXPORT_SRC:
79	$(RM) sparc/common/wanboot.c+
80	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
81		< sparc/common/wanboot.c > sparc/common/wanboot.c+
82	$(MV) sparc/common/wanboot.c+ sparc/common/wanboot.c
83	$(CHMOD) 444 sparc/common/wanboot.c
84	$(RM) sparc/common/wbcli.c+
85	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
86		< sparc/common/wbcli.c > sparc/common/wbcli.c+
87	$(MV) sparc/common/wbcli.c+ sparc/common/wbcli.c
88	$(CHMOD) 444 sparc/common/wbcli.c
89	$(RM) sparc/common/ramdisk.c+
90	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
91		< sparc/common/ramdisk.c > sparc/common/ramdisk.c+
92	$(MV) sparc/common/ramdisk.c+ sparc/common/ramdisk.c
93	$(CHMOD) 444 sparc/common/ramdisk.c
94	$(RM) sparcv9/Makefile.com+
95	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
96		< sparcv9/Makefile.com > sparcv9/Makefile.com+
97	$(MV) sparcv9/Makefile.com+ sparcv9/Makefile.com
98	$(CHMOD) 444 sparcv9/Makefile.com
99	$(RM) Makefile+
100	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
101		< Makefile > Makefile+
102	$(RM) Makefile
103	$(MV) Makefile+ Makefile
104	$(CHMOD) 444 Makefile
105# EXPORT DELETE END
106