diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 16:03:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 16:03:12 -0700 |
commit | 1c036588772d01655d851f75dffc27c971e072e2 (patch) | |
tree | ee35c5ecc726d4fdb77c462cccbe499d1c3292b7 /tools/power/cpupower/bench/Makefile | |
parent | a6f707b601c3f85d4b816ea08a757ea1af4f1cc0 (diff) | |
parent | f16603386b38c28979f4df1cafdc2fe73fa87d37 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/cpupowerutils
Pull cpupower updates from Dominik Brodowski.
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/cpupowerutils:
cpupower tools: add install target to the debug tools' makefiles
cpupower tools: allow to build debug tools in a separate directory too
cpupower: Fix broken mask values
cpupower tool: allow to build in a separate directory
cpupower tool: makefile: simplify the recipe used to generate cpupower.pot target
cpupower tool: remove use of undefined variables from the clean target of the top makefile
cpupower: Fix linking with --as-needed
cpupower: Remove unneeded code and by that fix a memleak
cpupower: Fix number of idle states
cpupower: Unify cpupower-frequency-* manpages
cpupower: Add cpupower-idle-info manpage
cpupower: AMD fam14h/Ontario monitor can also be used by fam12h cpus
cpupower: Better interface for accessing AMD pci registers
Diffstat (limited to 'tools/power/cpupower/bench/Makefile')
-rw-r--r-- | tools/power/cpupower/bench/Makefile | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/tools/power/cpupower/bench/Makefile b/tools/power/cpupower/bench/Makefile index 2b67606fc3e3..7ec7021a29cd 100644 --- a/tools/power/cpupower/bench/Makefile +++ b/tools/power/cpupower/bench/Makefile @@ -1,29 +1,36 @@ -LIBS = -L../ -lm -lcpupower +OUTPUT := ./ +ifeq ("$(origin O)", "command line") +ifneq ($(O),) + OUTPUT := $(O)/ +endif +endif -OBJS = main.o parse.o system.o benchmark.o +LIBS = -L../ -L$(OUTPUT) -lm -lcpupower + +OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\" -%.o : %.c +$(OUTPUT)%.o : %.c $(ECHO) " CC " $@ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ -cpufreq-bench: $(OBJS) +$(OUTPUT)cpufreq-bench: $(OBJS) $(ECHO) " CC " $@ $(QUIET) $(CC) -o $@ $(CFLAGS) $(OBJS) $(LIBS) -all: cpufreq-bench +all: $(OUTPUT)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 $(OUTPUT)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 + rm -f $(OUTPUT)*.o + rm -f $(OUTPUT)cpufreq-bench |