xref: /titanic_51/usr/src/cmd/sgs/Makefile.sub (revision 89b43686db1fe9681d80a7cf5662730cb9378cae)
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#
23# ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28# Standard subdirs makefile for the sgs area.
29#
30
31include		$(SRC)/Makefile.master
32
33# This is how the SUBDIRS stuff should look by the time the SGS
34# directory is fully converted:
35#
36# SUBDIRS=	$(MACH) $(BUILD64) $(MACH64)
37#
38# $(SUBDIRS):	FRC
39#	@cd $@; pwd; $(MAKE) $(TARGET)
40#
41# In the meantime, we use an sneaky trick on the $(SUBDIRS) target
42# to build whatever 64-bit directories we actually find as a side-effect
43# of descending into the 32-bit directories.  Ick.
44
45SUBDIRS =	$(MACH) $(EXTRASUBDIRS)
46
47all :=		TARGET= all
48clean :=	TARGET= clean
49clobber :=	TARGET= clobber
50delete :=	TARGET= delete
51install :=	TARGET= install
52lint :=		TARGET= lint
53catalog :=	TARGET= catalog
54package :=	TARGET= package
55chkmsg :=	TARGET= chkmsg
56
57.KEEP_STATE:
58.KEEP_STATE_FILE: .make.state.$(MACH)
59
60all clean clobber delete install lint catalog package chkmsg: \
61		$(SUBDIRS)
62
63$(SUBDIRS):	FRC
64		@ cd $@; pwd; $(MAKE) $(TARGET)
65		@ $(BUILD64)if [ -f $(MACH64)/Makefile ]; then		\
66		  $(BUILD64)     cd $(MACH64); pwd; $(MAKE) $(TARGET);	\
67		  $(BUILD64)else /bin/true; fi
68
69FRC:
70