Makefile 526 字节
Newer Older
1 2 3 4 5
CC		= $(CROSS_COMPILE)gcc
BUILD_OUTPUT	:= $(PWD)
PREFIX		:= /usr
DESTDIR		:=

L
Len Brown 已提交
6
turbostat : turbostat.c
7
CFLAGS +=	-Wall
8
CFLAGS +=	-I../../../../arch/x86/include/
L
Len Brown 已提交
9

10 11 12 13 14
%: %.c
	@mkdir -p $(BUILD_OUTPUT)
	$(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@

.PHONY : clean
L
Len Brown 已提交
15
clean :
16
	@rm -f $(BUILD_OUTPUT)/turbostat
L
Len Brown 已提交
17

18 19 20 21 22
install : turbostat
	install -d  $(DESTDIR)$(PREFIX)/bin
	install $(BUILD_OUTPUT)/turbostat $(DESTDIR)$(PREFIX)/bin/turbostat
	install -d  $(DESTDIR)$(PREFIX)/share/man/man8
	install turbostat.8 $(DESTDIR)$(PREFIX)/share/man/man8