xref: /titanic_44/usr/src/psm/stand/bootblks/ufs/sparc/Makefile (revision 628e3cbed6489fa1db545d8524a06cd6535af456)
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#ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# psm/stand/bootblks/ufs/sparc/Makefile
28#
29
30BASEDIR = ../..
31
32include $(BASEDIR)/Makefile.com
33
34#
35# This program is used to install the boot block
36#
37INSTALLBOOT		= installboot
38
39USR			= $(ROOT)/usr
40USR_SBIN		= $(USR)/sbin
41USR_SBIN_INSTALLBOOT	= $(USR_SBIN)/$(INSTALLBOOT)
42
43#
44# Overrides for installing installboot.
45#
46INS.file.555		= $(RM) $@; $(INS) -s -m 555 -f $(@D) $<
47$(CH)INS.file.555	= $(INS) -s -m 555 -u $(OWNER) -g $(GROUP) -f $(@D) $<
48
49
50SUBDIRS	= sun4u sun4v
51
52all	:=	TARGET= all
53install	:=	TARGET= install
54clean	:=	TARGET= clean
55clobber	:=	TARGET= clobber
56lint	:=	TARGET= lint
57
58.KEEP_STATE:
59
60all: $(INSTALLBOOT) $(SUBDIRS)
61
62install: $(USR_SBIN_INSTALLBOOT) $(SUBDIRS)
63
64lint clean: $(SUBDIRS)
65
66clobber: $(SUBDIRS)
67	-$(RM) $(INSTALLBOOT)
68
69$(SUBDIRS): FRC
70	@cd $@; pwd; $(MAKE) $(TARGET)
71
72FRC:
73
74#
75# install rules
76#
77$(USR_SBIN)/%:	% $(USR_SBIN)
78	$(INS.file.555)
79
80#
81# Pattern matching rules for source in this directory
82#
83%: %.sh
84	$(RM) $@
85	cat $< > $@
86	chmod +x $@
87