summaryrefslogtreecommitdiffstats
path: root/tools/power/cpupower/bench/Makefile
blob: 3d8fa21855f60295b533ca796674ea3e25e5dab8 (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
LIBS = -L../ -lm -lcpufreq

OBJS = main.o parse.o system.o benchmark.o
CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\"

ifeq ($(strip $(V)),false)
	CC=@../build/ccdv gcc
else
	CC=gcc
endif

cpufreq-bench: $(OBJS)
	$(CC) -o $@ $(CFLAGS) $(OBJS) $(LIBS)

all: cpufreq-bench

install:
	mkdir -p $(DESTDIR)/$(sbindir)
	mkdir -p $(DESTDIR)/$(bindir)
	mkdir -p $(DESTDIR)/$(docdir)
	mkdir -p $(DESTDIR)/$(confdir)
	install -m 755 cpufreq-bench $(DESTDIR)/$(sbindir)/cpufreq-bench
	install -m 755 cpufreq-bench_plot.sh $(DESTDIR)/$(bindir)/cpufreq-bench_plot.sh
	install -m 644 README-BENCH $(DESTDIR)/$(docdir)/README-BENCH
	install -m 755 cpufreq-bench_script.sh $(DESTDIR)/$(docdir)/cpufreq-bench_script.sh
	install -m 644 example.cfg $(DESTDIR)/$(confdir)/cpufreq-bench.conf

clean:
	rm -f *.o
	rm -f cpufreq-bench
OpenPOWER on IntegriCloud