xref: /titanic_44/usr/src/cmd/latencytop/Makefile.com (revision be468fc6d7266e97f1330ad9a761169925f5f3f1)
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# Copyright (c) 2008-2009, Intel Corporation.
23# All Rights Reserved.
24#
25
26PROG = latencytop
27OBJS = latencytop.o display.o dwrapper.o klog.o stat.o table.o util.o
28SRCS = $(OBJS:%.o=../common/%.c)
29
30include ../../Makefile.cmd
31
32CFLAGS += $(CCVERBOSE)
33CFLAGS64 += $(CCVERBOSE)
34
35CERRWARN += -_gcc=-Wno-uninitialized
36
37CPPFLAGS += -DEMBED_CONFIGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
38C99MODE = $(C99_ENABLE)
39LDLIBS += -lcurses -ldtrace
40all install	:= LDLIBS += -lglib-2.0
41
42LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
43LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
44LINTFLAGS64 += -erroff=E_NAME_USED_NOT_DEF2
45LINTFLAGS64 += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
46
47FILEMODE = 0555
48
49ELFWRAP = elfwrap
50WRAPOBJ = latencytop_wrap.o
51
52CLEANFILES += $(OBJS) $(WRAPOBJ) ./latencytop_d ./latencytop_trans
53
54.KEEP_STATE:
55
56all: $(PROG)
57
58install:        $(SUBDIRS)
59	-$(RM) $(ROOTPROG)
60	-$(LN) $(ISAEXEC) $(ROOTPROG)
61
62$(PROG): $(OBJS) $(WRAPOBJ)
63	$(LINK.c) -o $@ $(OBJS) $(WRAPOBJ) $(LDLIBS)
64	$(POST_PROCESS)
65
66$(WRAPOBJ): latencytop_d latencytop_trans
67	$(ELFWRAP) $(WRAPOPT) -o $(WRAPOBJ) latencytop_d latencytop_trans
68
69latencytop_d:
70	cp ../common/latencytop.d ./latencytop_d
71
72latencytop_trans:
73	cp ../common/latencytop.trans ./latencytop_trans
74
75clean:
76	$(RM) $(CLEANFILES)
77
78lint:	lint_SRCS
79
80%.o: ../common/%.c
81	$(COMPILE.c) $<
82
83include ../../Makefile.targ
84