Makefile revision 4538:844098db2e81
1193323Sed#
2193323Sed# CDDL HEADER START
3193323Sed#
4193323Sed# The contents of this file are subject to the terms of the
5193323Sed# Common Development and Distribution License (the "License").
6193323Sed# You may not use this file except in compliance with the License.
7193323Sed#
8193323Sed# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9193323Sed# or http://www.opensolaris.org/os/licensing.
10193323Sed# See the License for the specific language governing permissions
11193323Sed# and limitations under the License.
12193323Sed#
13193323Sed# When distributing Covered Code, include this CDDL HEADER in each
14193323Sed# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15193323Sed# If applicable, add the following below this CDDL HEADER, with the
16193323Sed# fields enclosed by brackets "[]" replaced with your own identifying
17193323Sed# information: Portions Copyright [yyyy] [name of copyright owner]
18234353Sdim#
19234353Sdim# CDDL HEADER END
20243830Sdim#
21193323Sed#
22249423Sdim#ident	"%Z%%M%	%I%	%E% SMI"
23193323Sed#
24249423Sdim# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25249423Sdim# Use is subject to license terms.
26193323Sed#
27193323Sed# cmd/sgs/size/sparc/Makefile
28193323Sed#
29193323Sed
30193323SedPROG=		size
31193323Sed
32193323Sedinclude 	../../../Makefile.cmd
33193323Sedinclude 	../../Makefile.com
34193323Sed
35193323SedOBJS=		main.o process.o fcns.o
36243830Sdim
37243830SdimSRCS=		$(OBJS:%.o=../common/%.c)
38243830Sdim
39193323SedLDFLAGS +=	'-R$$ORIGIN/../../lib'
40193323SedINCLIST=	-I../common -I../../include -I../../include/sparc \
41221345Sdim		-I$(SRCBASE)/uts/$(ARCH)/sys
42193323SedDEFLIST=	-DSPARC -DELF
43193323SedCPPFLAGS=	$(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
44193323SedLDLIBS +=	-L../../libconv/sparc -lconv -lelf
45221345SdimLINTFLAGS=	-mx $(LDLIBS)
46193323Sed
47193323SedCLEANFILES +=	$(LINTOUT)
48193323Sed
49193323Sed
50223017Sdim# Building SUNWonld results in a call to the `package' target.  Requirements
51223017Sdim# needed to run this application on older releases are established:
52223017Sdim#	i18n support requires libintl.so.1 prior to 2.6
53193323Sed
54193323Sedpackage :=	LDLIBS += /usr/lib/libintl.so.1
55193323Sed
56193323Sed
57193323Sed%.o:		../common/%.c
58193323Sed		$(COMPILE.c) $<
59221345Sdim
60221345Sdim.KEEP_STATE:
61221345Sdim
62221345Sdimall:		$(PROG)
63193323Sed
64193323Sed$(PROG):	$(OBJS)
65193323Sed		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
66221345Sdim		$(POST_PROCESS)
67218893Sdim
68218893Sdimpackage \
69249423Sdiminstall:	all $(ROOTPROG) $(ROOTCCSBINLINK)
70249423Sdim
71249423Sdimclean:
72249423Sdim		$(RM) $(OBJS) $(CLEANFILES)
73249423Sdim
74249423Sdimlint:		$(LINTOUT)
75249423Sdim
76249423Sdim$(LINTOUT):	$(SRCS)
77249423Sdim		$(LINT.c) $(SRCS) > $(LINTOUT) 2>&1
78249423Sdim
79249423Sdiminclude		../../../Makefile.targ
80249423Sdim