--- a/Makefile +++ b/Makefile @@ -37,6 +37,9 @@ NLS ?= true # cpufreq-bench benchmarking tool CPUFRQ_BENCH ?= false +# Set the following to 'false' on non-x86, cpufreq-aperf uses cpuid +APERF ?= true + # Use the sysfs-based interface which is included in all 2.6 kernels # built with cpufreq support SYSFS ?= true @@ -199,7 +202,12 @@ cpufreq-%: libcpufreq.so.$(LIB_MAJ) $(UT $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@ utils/$@.o -lcpufreq $(QUIET) $(STRIPCMD) $@ -utils: cpufreq-info cpufreq-set cpufreq-aperf +UTILS = cpufreq-info cpufreq-set +ifeq ($(strip $(APERF)),true) +UTILS += cpufreq-aperf +endif + +utils: $(UTILS) po/$(PACKAGE).pot: $(UTIL_SRC) @xgettext --default-domain=$(PACKAGE) --add-comments \ @@ -241,9 +249,7 @@ install-lib: install-tools: $(INSTALL) -d $(DESTDIR)${bindir} - $(INSTALL_PROGRAM) cpufreq-set $(DESTDIR)${bindir}/cpufreq-set - $(INSTALL_PROGRAM) cpufreq-info $(DESTDIR)${bindir}/cpufreq-info - $(INSTALL_PROGRAM) cpufreq-aperf $(DESTDIR)${bindir}/cpufreq-aperf + $(INSTALL_PROGRAM) $(UTILS) $(DESTDIR)${bindir}/ install-man: $(INSTALL_DATA) -D man/cpufreq-set.1 $(DESTDIR)${mandir}/man1/cpufreq-set.1