xref: /illumos-gate/usr/src/cmd/sgs/tools/Makefile (revision 843e19887f64dde75055cf8842fc4db2171eff45)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# Makefile to support tools used for linker development.  GEXECS are those
29# tools that the installed for distribution in the SUNWonld package.
30#
31#  o	`c' programs are built from the $(MACH)/Makefile
32#
33#  o	info: summarizes relocation overhead, and a sorted string listing.
34#
35#  o	proto: creates a proto directory structure suitable for sgs make
36#	installs (basically a subset of Targetdirs).
37#
38# cmd/sgs/tools/Makefile
39
40include		$(SRC)/Makefile.master
41
42LSSRCS=		info.sh	\
43		proto.sh
44
45SRCS=		$(LSSRCS)
46
47LEXECS=		$(LSSRCS:%.sh=%)
48
49ROOTDIR =	$(ROOT)/opt/SUNWonld/bin
50ROOTPROGS =	$(GEXECS:%=$(ROOTDIR)/%)
51ROOTPROGS +=	$(PSRCS:%=$(ROOTDIR)/%)
52
53$(ROOTPROGS) :=	FILEMODE=755
54
55SUBDIRS=	$(MACH) man
56
57all:=		TARGET= all
58install:=	TARGET= install
59clean:=		TARGET= clean
60clobber:=	TARGET= clobber
61lint:=		TARGET= lint
62
63
64.KEEP_STATE:
65
66all:		$(EXECS) $(SUBDIRS)
67
68install:	all $(ROOTPROGS) $(SUBDIRS)
69
70clean clobber:	$(SUBDIRS)
71		$(RM) $(RMFLAGS) $(EXECS)
72
73delete:
74
75lint:		$(SUBDIRS)
76
77%:		%.pl
78		$(RM) $@
79		cat $< > $@
80		chmod +x $@
81
82%:		%.ksh
83		$(RM) $@
84		cat $< > $@
85		chmod +x $@
86
87$(SUBDIRS):	FRC
88		@cd $@; pwd; $(MAKE) $(TARGET)
89
90$(ROOTDIR)/%:	%
91		$(INS.file)
92
93$(ROOTDIR)/%:	scoping/%
94		$(INS.file)
95
96FRC:
97
98execs:		$(EXECS)
99