aboutsummaryrefslogtreecommitdiffstats
path: root/tools/misc/cpuperf/Makefile
blob: 932c5e82b5cc245064fa8cab80db8d7ac3062981 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Make Performance counter tool
#
# $Id: Makefile,v 1.1 2003/10/13 16:49:44 jrb44 Exp $
#
# $Log: Makefile,v $
# Revision 1.1  2003/10/13 16:49:44  jrb44
# Initial revision
#
#

INSTALL		= install
INSTALL_PROG	= $(INSTALL) -m0755
INSTALL_DIR	= $(INSTALL) -d -m0755

# these are for Xen
XEN_ROOT=../../..
include $(XEN_ROOT)/tools/Rules.mk

HDRS         = $(wildcard *.h)
SRCS         = $(wildcard *.c)
OBJS         = $(patsubst %.c,%.o,$(SRCS))

TARGETS      = cpuperf-xen cpuperf-perfcntr

INSTALL_BIN  = $(TARGETS)


.PHONY: all
all: $(TARGETS)

.PHONY: clean
clean:
	$(RM) *.o $(TARGETS)

%: %.c $(HDRS) Makefile
	$(CC) $(CFLAGS) -o $@ $<

cpuperf-xen: cpuperf.c $(HDRS) Makefile
	$(CC) $(CFLAGS) -I $(XEN_LIBXC) -L$(XEN_LIBXC) -lxenctrl -DXENO -o $@ $<

cpuperf-perfcntr: cpuperf.c $(HDRS) Makefile
	$(CC) $(CFLAGS) -DPERFCNTR -o $@ $<

.PHONY: install
install: all
	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin


# End of $RCSfile: Makefile,v $