aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/cpupower/bench
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.com>2015-12-01 17:14:14 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-03 02:30:30 +0100
commite51207f0030474958e59bbc7e002f169bdb05c50 (patch)
tree409ed1391ce5984f053b259b6d7b52e05db53749 /tools/power/cpupower/bench
parentcpupower: Fix precedence issue (diff)
downloadlinux-dev-e51207f0030474958e59bbc7e002f169bdb05c50.tar.xz
linux-dev-e51207f0030474958e59bbc7e002f169bdb05c50.zip
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