1 CC = $(CROSS_COMPILE)gcc
2 BUILD_OUTPUT := $(CURDIR)
6 ifeq ("$(origin O)", "command line")
10 turbostat : turbostat.c
12 CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
15 @mkdir -p $(BUILD_OUTPUT)
16 $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
20 @rm -f $(BUILD_OUTPUT)/turbostat
23 install -d $(DESTDIR)$(PREFIX)/bin
24 install $(BUILD_OUTPUT)/turbostat $(DESTDIR)$(PREFIX)/bin/turbostat
25 install -d $(DESTDIR)$(PREFIX)/share/man/man8
26 install turbostat.8 $(DESTDIR)$(PREFIX)/share/man/man8