From e51207f0030474958e59bbc7e002f169bdb05c50 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 1 Dec 2015 17:14:14 +0100 Subject: 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 Signed-off-by: Rafael J. Wysocki --- tools/power/cpupower/bench/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/power/cpupower/bench') 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 -- cgit v1.2.3-59-g8ed1b