xref: /illumos-gate/usr/src/cmd/sgs/size/sparcv9/Makefile (revision 749f21d359d8fbd020c974a1a5227316221bfc9c)
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 1998-2003 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/sgs/size/sparcv9/Makefile
29#
30
31PROG=		size
32
33include 	../../../Makefile.cmd
34include 	../../Makefile.com
35
36OBJS=		main.o process.o fcns.o
37
38SRCS=		$(OBJS:%.o=../common/%.c)
39
40LDFLAGS +=	'-R$$ORIGIN/../../../lib/$(MACH64)'
41INCLIST=	-I../common -I../../include -I../../include/sparc \
42		-I$(SRCBASE)/uts/$(ARCH)/sys
43DEFLIST=	-DSPARC -DELF
44CPPFLAGS=	$(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
45LDLIBS +=	-L../../libconv/sparcv9 -lconv -lelf
46LINTFLAGS64=	-mx -Xarch=v9 $(LDLIBS)
47
48CLEANFILES +=	$(LINTOUT)
49
50%.o:		../common/%.c
51		$(COMPILE.c) $<
52
53$(ROOTCCSBIN64)/%: %
54	$(INS.file)
55
56.KEEP_STATE:
57
58all:		$(PROG)
59
60$(PROG):	$(OBJS)
61		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
62		$(POST_PROCESS)
63
64package \
65install:	all $(ROOTCCSBINPROG64)
66
67clean:
68		$(RM) $(OBJS) $(CLEANFILES)
69
70lint:		$(LINTOUT)
71
72$(LINTOUT):	$(SRCS)
73		$(LINT.c) $(SRCS) > $(LINTOUT) 2>&1
74
75include		../../../Makefile.targ
76include		../../Makefile.sub.64
77