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