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