aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/cpupower/.gitignore7
-rw-r--r--tools/power/cpupower/Makefile26
-rw-r--r--tools/power/cpupower/bench/Makefile2
3 files changed, 17 insertions, 18 deletions
diff --git a/tools/power/cpupower/.gitignore b/tools/power/cpupower/.gitignore
index 4f0eb1d798df..8a83dd2ffc11 100644
--- a/tools/power/cpupower/.gitignore
+++ b/tools/power/cpupower/.gitignore
@@ -1,7 +1,7 @@
1.libs 1.libs
2libcpufreq.so 2libcpupower.so
3libcpufreq.so.0 3libcpupower.so.0
4libcpufreq.so.0.0.0 4libcpupower.so.0.0.0
5build/ccdv 5build/ccdv
6cpufreq-info 6cpufreq-info
7cpufreq-set 7cpufreq-set
@@ -13,7 +13,6 @@ lib/proc.lo
13lib/proc.o 13lib/proc.o
14lib/sysfs.lo 14lib/sysfs.lo
15lib/sysfs.o 15lib/sysfs.o
16libcpufreq.la
17po/cpupowerutils.pot 16po/cpupowerutils.pot
18po/*.gmo 17po/*.gmo
19utils/cpufreq-info.o 18utils/cpufreq-info.o
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index 90d079e0e48d..d1a99e0e7b7a 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -167,20 +167,20 @@ endif
167 167
168# the actual make rules 168# the actual make rules
169 169
170all: libcpufreq cpupower $(COMPILE_NLS) $(COMPILE_BENCH) 170all: libcpupower cpupower $(COMPILE_NLS) $(COMPILE_BENCH)
171 171
172lib/%.o: $(LIB_SRC) $(LIB_HEADERS) 172lib/%.o: $(LIB_SRC) $(LIB_HEADERS)
173 $(ECHO) " CC " $@ 173 $(ECHO) " CC " $@
174 $(QUIET) $(CC) $(CFLAGS) -fPIC -o $@ -c lib/$*.c 174 $(QUIET) $(CC) $(CFLAGS) -fPIC -o $@ -c lib/$*.c
175 175
176libcpufreq.so.$(LIB_MAJ): $(LIB_OBJS) 176libcpupower.so.$(LIB_MAJ): $(LIB_OBJS)
177 $(ECHO) " LD " $@ 177 $(ECHO) " LD " $@
178 $(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ 178 $(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \
179 -Wl,-soname,libcpufreq.so.$(LIB_MIN) $(LIB_OBJS) 179 -Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS)
180 @ln -sf $@ libcpufreq.so 180 @ln -sf $@ libcpupower.so
181 @ln -sf $@ libcpufreq.so.$(LIB_MIN) 181 @ln -sf $@ libcpupower.so.$(LIB_MIN)
182 182
183libcpufreq: libcpufreq.so.$(LIB_MAJ) 183libcpupower: libcpupower.so.$(LIB_MAJ)
184 184
185# Let all .o files depend on its .c file and all headers 185# Let all .o files depend on its .c file and all headers
186# Might be worth to put this into utils/Makefile at some point of time 186# Might be worth to put this into utils/Makefile at some point of time
@@ -190,9 +190,9 @@ $(UTIL_OBJS): $(UTIL_HEADERS)
190 $(ECHO) " CC " $@ 190 $(ECHO) " CC " $@
191 $(QUIET) $(CC) $(CFLAGS) -I./lib -I ./utils -o $@ -c $*.c 191 $(QUIET) $(CC) $(CFLAGS) -I./lib -I ./utils -o $@ -c $*.c
192 192
193cpupower: $(UTIL_OBJS) libcpufreq.so.$(LIB_MAJ) 193cpupower: $(UTIL_OBJS) libcpupower.so.$(LIB_MAJ)
194 $(ECHO) " CC " $@ 194 $(ECHO) " CC " $@
195 $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -lcpufreq -lrt -lpci -L. -o $@ $(UTIL_OBJS) 195 $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -lcpupower -lrt -lpci -L. -o $@ $(UTIL_OBJS)
196 $(QUIET) $(STRIPCMD) $@ 196 $(QUIET) $(STRIPCMD) $@
197 197
198po/$(PACKAGE).pot: $(UTIL_SRC) 198po/$(PACKAGE).pot: $(UTIL_SRC)
@@ -221,7 +221,7 @@ update-po: po/$(PACKAGE).pot
221 fi; \ 221 fi; \
222 done; 222 done;
223 223
224compile-bench: libcpufreq.so.$(LIB_MAJ) 224compile-bench: libcpupower.so.$(LIB_MAJ)
225 @V=$(V) confdir=$(confdir) $(MAKE) -C bench 225 @V=$(V) confdir=$(confdir) $(MAKE) -C bench
226 226
227clean: 227clean:
@@ -230,14 +230,14 @@ clean:
230 -rm -f $(UTIL_BINS) 230 -rm -f $(UTIL_BINS)
231 -rm -f $(IDLE_OBJS) 231 -rm -f $(IDLE_OBJS)
232 -rm -f cpupower 232 -rm -f cpupower
233 -rm -f libcpufreq.so* 233 -rm -f libcpupower.so*
234 -rm -rf po/*.gmo po/*.pot 234 -rm -rf po/*.gmo po/*.pot
235 $(MAKE) -C bench clean 235 $(MAKE) -C bench clean
236 236
237 237
238install-lib: 238install-lib:
239 $(INSTALL) -d $(DESTDIR)${libdir} 239 $(INSTALL) -d $(DESTDIR)${libdir}
240 $(CP) libcpufreq.so* $(DESTDIR)${libdir}/ 240 $(CP) libcpupower.so* $(DESTDIR)${libdir}/
241 $(INSTALL) -d $(DESTDIR)${includedir} 241 $(INSTALL) -d $(DESTDIR)${includedir}
242 $(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h 242 $(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h
243 243
@@ -267,7 +267,7 @@ install-bench:
267install: all install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH) 267install: all install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)
268 268
269uninstall: 269uninstall:
270 - rm -f $(DESTDIR)${libdir}/libcpufreq.* 270 - rm -f $(DESTDIR)${libdir}/libcpupower.*
271 - rm -f $(DESTDIR)${includedir}/cpufreq.h 271 - rm -f $(DESTDIR)${includedir}/cpufreq.h
272 - rm -f $(DESTDIR)${bindir}/utils/cpupower 272 - rm -f $(DESTDIR)${bindir}/utils/cpupower
273 - rm -f $(DESTDIR)${mandir}/man1/cpufreq-set.1 273 - rm -f $(DESTDIR)${mandir}/man1/cpufreq-set.1
@@ -276,4 +276,4 @@ uninstall:
276 rm -f $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupowerutils.mo; \ 276 rm -f $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupowerutils.mo; \
277 done; 277 done;
278 278
279.PHONY: all utils libcpufreq update-po create-gmo install-lib install-tools install-man install-gmo install uninstall clean 279.PHONY: all utils libcpupower update-po create-gmo install-lib install-tools install-man install-gmo install uninstall clean
diff --git a/tools/power/cpupower/bench/Makefile b/tools/power/cpupower/bench/Makefile
index d779aac58ede..2b67606fc3e3 100644
--- a/tools/power/cpupower/bench/Makefile
+++ b/tools/power/cpupower/bench/Makefile
@@ -1,4 +1,4 @@
1LIBS = -L../ -lm -lcpufreq 1LIBS = -L../ -lm -lcpupower
2 2
3OBJS = main.o parse.o system.o benchmark.o 3OBJS = main.o parse.o system.o benchmark.o
4CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\" 4CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\"