aboutsummaryrefslogtreecommitdiff
path: root/tools/power/cpupower/bench
diff options
context:
space:
mode:
authorThomas Renninger2015-12-01 17:14:14 +0100
committerRafael J. Wysocki2015-12-03 02:30:30 +0100
commite51207f0030474958e59bbc7e002f169bdb05c50 (patch)
tree409ed1391ce5984f053b259b6d7b52e05db53749 /tools/power/cpupower/bench
parent7b0e1bf171effb71fa946e26d28895219de179cc (diff)
cpupower: Provide STATIC variable in Makefile for debug builds
When working on cpupower code, you often want to compile library code into the binary. This allows to execute modified cpupower code, even with library changes without doing "make install" Signed-off-by: Thomas Renninger <trenn@suse.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power/cpupower/bench')
-rw-r--r--tools/power/cpupower/bench/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/power/cpupower/bench/Makefile b/tools/power/cpupower/bench/Makefile
index 7ec7021a29cd..d0f879b223fc 100644
--- a/tools/power/cpupower/bench/Makefile
+++ b/tools/power/cpupower/bench/Makefile
@@ -5,9 +5,15 @@ ifneq ($(O),)
endif
endif
+ifeq ($(strip $(STATIC)),true)
+LIBS = -L../ -L$(OUTPUT) -lm
+OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o \
+ $(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/sysfs.o
+else
LIBS = -L../ -L$(OUTPUT) -lm -lcpupower
-
OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o
+endif
+
CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\"
$(OUTPUT)%.o : %.c