xref: /titanic_51/usr/src/cmd/latencytop/Makefile.com (revision 62b885670cb2373723bdad8e9fc26c05f8dabfb6)
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 conststr.o
28SRCS = $(OBJS:%.o=../common/%.c)
29
30include ../../Makefile.cmd
31
32CFLAGS += $(CCVERBOSE)
33CFLAGS64 += $(CCVERBOSE)
34
35CPPFLAGS += -DEMBED_CONFIGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
36C99MODE = $(C99_ENABLE)
37LDLIBS += -lcurses -ldtrace
38all install	:= LDLIBS += -lglib-2.0
39
40LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
41
42LINTFLAGS64 += -erroff=E_NAME_USED_NOT_DEF2
43
44FILEMODE = 0555
45GROUP = bin
46
47CLEANFILES += $(OBJS)
48
49.KEEP_STATE:
50
51all: dumpcfg $(PROG)
52
53install:        dumpcfg $(SUBDIRS)
54	-$(RM) $(ROOTPROG)
55	-$(LN) $(ISAEXEC) $(ROOTPROG)
56
57$(PROG): $(OBJS)
58	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
59	$(POST_PROCESS)
60
61dumpcfg:
62	cd ../common; xxd -i latencytop.d >./conststr.c; xxd -i latencytop.trans >>./conststr.c; cd ..
63
64rmcfg:
65	rm -f ../common/conststr.c
66
67clean:	rmcfg
68	$(RM) $(CLEANFILES)
69
70lint:	dumpcfg lint_SRCS
71
72%.o: ../common/%.c
73	$(COMPILE.c) $<
74
75include ../../Makefile.targ
76