treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / power / x86 / x86_energy_perf_policy / Makefile
blob666b325a62a2299aba039fcbdd3ffae6ba26dbfc
1 # SPDX-License-Identifier: GPL-2.0
2 CC = $(CROSS_COMPILE)gcc
3 BUILD_OUTPUT := $(CURDIR)
4 PREFIX := /usr
5 DESTDIR :=
7 ifeq ("$(origin O)", "command line")
8 BUILD_OUTPUT := $(O)
9 endif
11 x86_energy_perf_policy : x86_energy_perf_policy.c
12 override CFLAGS += -O2 -Wall -I../../../include
13 override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
14 override CFLAGS += -D_FORTIFY_SOURCE=2
16 %: %.c
17 @mkdir -p $(BUILD_OUTPUT)
18 $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
20 .PHONY : clean
21 clean :
22 @rm -f $(BUILD_OUTPUT)/x86_energy_perf_policy
24 install : x86_energy_perf_policy
25 install -d $(DESTDIR)$(PREFIX)/bin
26 install $(BUILD_OUTPUT)/x86_energy_perf_policy $(DESTDIR)$(PREFIX)/bin/x86_energy_perf_policy
27 install -d $(DESTDIR)$(PREFIX)/share/man/man8
28 install -m 644 x86_energy_perf_policy.8 $(DESTDIR)$(PREFIX)/share/man/man8