2011-04-21 23:50:26 +08:00
|
|
|
# Makefile for cpupower
|
2011-03-30 22:30:11 +08:00
|
|
|
#
|
|
|
|
# Copyright (C) 2005,2006 Dominik Brodowski <linux@dominikbrodowski.net>
|
|
|
|
#
|
|
|
|
# Based largely on the Makefile for udev by:
|
|
|
|
#
|
|
|
|
# Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
2012-02-01 19:08:20 +08:00
|
|
|
OUTPUT=./
|
|
|
|
ifeq ("$(origin O)", "command line")
|
|
|
|
OUTPUT := $(O)/
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(OUTPUT),)
|
|
|
|
# check that the output directory actually exists
|
|
|
|
OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
|
|
|
|
$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
|
|
|
|
endif
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
# --- CONFIGURATION BEGIN ---
|
|
|
|
|
|
|
|
# Set the following to `true' to make a unstripped, unoptimized
|
|
|
|
# binary. Leave this set to `false' for production use.
|
2011-08-12 07:11:35 +08:00
|
|
|
DEBUG ?= true
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
# make the build silent. Set this to something else to make it noisy again.
|
|
|
|
V ?= false
|
|
|
|
|
|
|
|
# Internationalization support (output in different languages).
|
|
|
|
# Requires gettext.
|
|
|
|
NLS ?= true
|
|
|
|
|
|
|
|
# Set the following to 'true' to build/install the
|
|
|
|
# cpufreq-bench benchmarking tool
|
2011-08-17 03:36:21 +08:00
|
|
|
CPUFREQ_BENCH ?= true
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2015-12-02 00:14:14 +08:00
|
|
|
# Do not build libraries, but build the code in statically
|
|
|
|
# Libraries are still built, otherwise the Makefile code would
|
|
|
|
# be rather ugly.
|
|
|
|
export STATIC ?= false
|
|
|
|
|
2011-03-30 22:30:11 +08:00
|
|
|
# Prefix to the directories we're installing to
|
2011-04-20 01:20:12 +08:00
|
|
|
DESTDIR ?=
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
# --- CONFIGURATION END ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Package-related definitions. Distributions can modify the version
|
|
|
|
# and _should_ modify the PACKAGE_BUGREPORT definition
|
|
|
|
|
2011-04-21 02:01:39 +08:00
|
|
|
VERSION= $(shell ./utils/version-gen.sh)
|
2016-04-28 21:24:40 +08:00
|
|
|
LIB_MAJ= 0.0.1
|
2011-03-30 22:30:11 +08:00
|
|
|
LIB_MIN= 0
|
|
|
|
|
2011-04-21 23:50:26 +08:00
|
|
|
PACKAGE = cpupower
|
2014-04-22 13:12:05 +08:00
|
|
|
PACKAGE_BUGREPORT = linux-pm@vger.kernel.org
|
2011-03-30 22:30:11 +08:00
|
|
|
LANGUAGES = de fr it cs pt
|
|
|
|
|
|
|
|
|
|
|
|
# Directory definitions. These are default and most probably
|
|
|
|
# do not need to be changed. Please note that DESTDIR is
|
|
|
|
# added in front of any of them
|
|
|
|
|
|
|
|
bindir ?= /usr/bin
|
|
|
|
sbindir ?= /usr/sbin
|
|
|
|
mandir ?= /usr/man
|
|
|
|
includedir ?= /usr/include
|
|
|
|
libdir ?= /usr/lib
|
|
|
|
localedir ?= /usr/share/locale
|
2011-04-21 23:50:26 +08:00
|
|
|
docdir ?= /usr/share/doc/packages/cpupower
|
2011-03-30 22:30:11 +08:00
|
|
|
confdir ?= /etc/
|
|
|
|
|
|
|
|
# Toolchain: what tools do we use, and what options do they need:
|
|
|
|
|
|
|
|
CP = cp -fpR
|
|
|
|
INSTALL = /usr/bin/install -c
|
|
|
|
INSTALL_PROGRAM = ${INSTALL}
|
|
|
|
INSTALL_DATA = ${INSTALL} -m 644
|
|
|
|
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
|
|
|
|
|
|
|
# If you are running a cross compiler, you may want to set this
|
|
|
|
# to something more interesting, like "arm-linux-". If you want
|
|
|
|
# to compile vs uClibc, that can be done here as well.
|
|
|
|
CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
|
|
|
|
CC = $(CROSS)gcc
|
|
|
|
LD = $(CROSS)gcc
|
|
|
|
AR = $(CROSS)ar
|
|
|
|
STRIP = $(CROSS)strip
|
|
|
|
RANLIB = $(CROSS)ranlib
|
|
|
|
HOSTCC = gcc
|
2012-02-01 19:08:20 +08:00
|
|
|
MKDIR = mkdir
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Now we set up the build system
|
|
|
|
#
|
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
GMO_FILES = ${shell for HLANG in ${LANGUAGES}; do echo $(OUTPUT)po/$$HLANG.gmo; done;}
|
2011-04-20 00:52:44 +08:00
|
|
|
|
2011-03-30 22:30:11 +08:00
|
|
|
export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS
|
|
|
|
|
|
|
|
# check if compiler option is supported
|
2012-10-02 22:42:36 +08:00
|
|
|
cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -x c /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
# use '-Os' optimization if available, else use -O2
|
|
|
|
OPTIMIZATION := $(call cc-supports,-Os,-O2)
|
|
|
|
|
|
|
|
WARNINGS := -Wall -Wchar-subscripts -Wpointer-arith -Wsign-compare
|
|
|
|
WARNINGS += $(call cc-supports,-Wno-pointer-sign)
|
|
|
|
WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
|
|
|
|
WARNINGS += -Wshadow
|
|
|
|
|
2011-04-21 02:01:39 +08:00
|
|
|
CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
|
2011-03-30 22:30:11 +08:00
|
|
|
-DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
|
|
|
|
|
2016-04-28 21:24:40 +08:00
|
|
|
UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \
|
2011-03-30 22:30:11 +08:00
|
|
|
utils/helpers/sysfs.o utils/helpers/misc.o utils/helpers/cpuid.o \
|
|
|
|
utils/helpers/pci.o utils/helpers/bitmask.o \
|
|
|
|
utils/idle_monitor/nhm_idle.o utils/idle_monitor/snb_idle.o \
|
2013-06-28 21:34:33 +08:00
|
|
|
utils/idle_monitor/hsw_ext_idle.o \
|
2011-03-30 22:30:11 +08:00
|
|
|
utils/idle_monitor/amd_fam14h_idle.o utils/idle_monitor/cpuidle_sysfs.o \
|
|
|
|
utils/idle_monitor/mperf_monitor.o utils/idle_monitor/cpupower-monitor.o \
|
|
|
|
utils/cpupower.o utils/cpufreq-info.o utils/cpufreq-set.o \
|
2013-06-28 21:34:31 +08:00
|
|
|
utils/cpupower-set.o utils/cpupower-info.o utils/cpuidle-info.o \
|
|
|
|
utils/cpuidle-set.o
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
UTIL_SRC := $(UTIL_OBJS:.o=.c)
|
|
|
|
|
|
|
|
UTIL_OBJS := $(addprefix $(OUTPUT),$(UTIL_OBJS))
|
|
|
|
|
2011-03-30 22:30:11 +08:00
|
|
|
UTIL_HEADERS = utils/helpers/helpers.h utils/idle_monitor/cpupower-monitor.h \
|
|
|
|
utils/helpers/bitmask.h \
|
|
|
|
utils/idle_monitor/idle_monitors.h utils/idle_monitor/idle_monitors.def
|
|
|
|
|
2016-04-28 21:24:40 +08:00
|
|
|
LIB_HEADERS = lib/cpufreq.h lib/cpupower.h lib/cpuidle.h
|
|
|
|
LIB_SRC = lib/cpufreq.c lib/cpupower.c lib/cpuidle.c
|
|
|
|
LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o
|
2012-02-01 19:08:20 +08:00
|
|
|
LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS))
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
CFLAGS += -pipe
|
|
|
|
|
|
|
|
ifeq ($(strip $(NLS)),true)
|
|
|
|
INSTALL_NLS += install-gmo
|
2011-04-20 00:52:44 +08:00
|
|
|
COMPILE_NLS += create-gmo
|
2011-08-19 23:00:02 +08:00
|
|
|
CFLAGS += -DNLS
|
2011-03-30 22:30:11 +08:00
|
|
|
endif
|
|
|
|
|
2011-08-17 03:36:21 +08:00
|
|
|
ifeq ($(strip $(CPUFREQ_BENCH)),true)
|
2011-03-30 22:30:11 +08:00
|
|
|
INSTALL_BENCH += install-bench
|
|
|
|
COMPILE_BENCH += compile-bench
|
|
|
|
endif
|
|
|
|
|
2015-12-02 00:14:14 +08:00
|
|
|
ifeq ($(strip $(STATIC)),true)
|
|
|
|
UTIL_OBJS += $(LIB_OBJS)
|
|
|
|
UTIL_HEADERS += $(LIB_HEADERS)
|
|
|
|
UTIL_SRC += $(LIB_SRC)
|
|
|
|
endif
|
|
|
|
|
2011-03-30 22:30:11 +08:00
|
|
|
CFLAGS += $(WARNINGS)
|
|
|
|
|
|
|
|
ifeq ($(strip $(V)),false)
|
2011-04-19 15:03:52 +08:00
|
|
|
QUIET=@
|
|
|
|
ECHO=@echo
|
2011-03-30 22:30:11 +08:00
|
|
|
else
|
|
|
|
QUIET=
|
2011-04-19 15:03:52 +08:00
|
|
|
ECHO=@\#
|
2011-03-30 22:30:11 +08:00
|
|
|
endif
|
2011-04-19 15:03:52 +08:00
|
|
|
export QUIET ECHO
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
# if DEBUG is enabled, then we do not strip or optimize
|
|
|
|
ifeq ($(strip $(DEBUG)),true)
|
2011-04-21 02:01:39 +08:00
|
|
|
CFLAGS += -O1 -g -DDEBUG
|
2011-03-30 22:30:11 +08:00
|
|
|
STRIPCMD = /bin/true -Since_we_are_debugging
|
|
|
|
else
|
|
|
|
CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
|
|
|
|
STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# the actual make rules
|
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
all: libcpupower $(OUTPUT)cpupower $(COMPILE_NLS) $(COMPILE_BENCH)
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
$(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS)
|
2011-04-19 15:03:52 +08:00
|
|
|
$(ECHO) " CC " $@
|
2011-04-21 02:01:39 +08:00
|
|
|
$(QUIET) $(CC) $(CFLAGS) -fPIC -o $@ -c lib/$*.c
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
$(OUTPUT)libcpupower.so.$(LIB_MAJ): $(LIB_OBJS)
|
2011-04-19 15:03:52 +08:00
|
|
|
$(ECHO) " LD " $@
|
2011-04-21 02:01:39 +08:00
|
|
|
$(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \
|
2011-04-21 23:50:25 +08:00
|
|
|
-Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS)
|
2012-02-01 19:08:20 +08:00
|
|
|
@ln -sf $(@F) $(OUTPUT)libcpupower.so
|
|
|
|
@ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_MIN)
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
libcpupower: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
# Let all .o files depend on its .c file and all headers
|
|
|
|
# Might be worth to put this into utils/Makefile at some point of time
|
|
|
|
$(UTIL_OBJS): $(UTIL_HEADERS)
|
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
$(OUTPUT)%.o: %.c
|
2011-04-19 15:03:52 +08:00
|
|
|
$(ECHO) " CC " $@
|
2011-04-21 02:01:39 +08:00
|
|
|
$(QUIET) $(CC) $(CFLAGS) -I./lib -I ./utils -o $@ -c $*.c
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
$(OUTPUT)cpupower: $(UTIL_OBJS) $(OUTPUT)libcpupower.so.$(LIB_MAJ)
|
2011-04-19 15:03:52 +08:00
|
|
|
$(ECHO) " CC " $@
|
2015-12-02 00:14:14 +08:00
|
|
|
ifeq ($(strip $(STATIC)),true)
|
|
|
|
$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lrt -lpci -L$(OUTPUT) -o $@
|
|
|
|
else
|
2015-03-11 08:26:36 +08:00
|
|
|
$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lcpupower -lrt -lpci -L$(OUTPUT) -o $@
|
2015-12-02 00:14:14 +08:00
|
|
|
endif
|
2011-04-19 15:03:52 +08:00
|
|
|
$(QUIET) $(STRIPCMD) $@
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
$(OUTPUT)po/$(PACKAGE).pot: $(UTIL_SRC)
|
2011-04-20 00:52:44 +08:00
|
|
|
$(ECHO) " GETTEXT " $@
|
|
|
|
$(QUIET) xgettext --default-domain=$(PACKAGE) --add-comments \
|
2012-02-01 19:08:19 +08:00
|
|
|
--keyword=_ --keyword=N_ $(UTIL_SRC) -p $(@D) -o $(@F)
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
$(OUTPUT)po/%.gmo: po/%.po
|
2011-04-20 00:52:44 +08:00
|
|
|
$(ECHO) " MSGFMT " $@
|
|
|
|
$(QUIET) msgfmt -o $@ po/$*.po
|
|
|
|
|
|
|
|
create-gmo: ${GMO_FILES}
|
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
update-po: $(OUTPUT)po/$(PACKAGE).pot
|
2011-04-20 00:52:44 +08:00
|
|
|
$(ECHO) " MSGMRG " $@
|
|
|
|
$(QUIET) @for HLANG in $(LANGUAGES); do \
|
|
|
|
echo -n "Updating $$HLANG "; \
|
2012-02-01 19:08:20 +08:00
|
|
|
if msgmerge po/$$HLANG.po $< -o \
|
|
|
|
$(OUTPUT)po/$$HLANG.new.po; then \
|
|
|
|
mv -f $(OUTPUT)po/$$HLANG.new.po $(OUTPUT)po/$$HLANG.po; \
|
2011-03-30 22:30:11 +08:00
|
|
|
else \
|
|
|
|
echo "msgmerge for $$HLANG failed!"; \
|
2012-02-01 19:08:20 +08:00
|
|
|
rm -f $(OUTPUT)po/$$HLANG.new.po; \
|
2011-03-30 22:30:11 +08:00
|
|
|
fi; \
|
|
|
|
done;
|
|
|
|
|
2012-02-01 19:08:20 +08:00
|
|
|
compile-bench: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
|
|
|
|
@V=$(V) confdir=$(confdir) $(MAKE) -C bench O=$(OUTPUT)
|
|
|
|
|
|
|
|
# we compile into subdirectories. if the target directory is not the
|
|
|
|
# source directory, they might not exists. So we depend the various
|
|
|
|
# files onto their directories.
|
|
|
|
DIRECTORY_DEPS = $(LIB_OBJS) $(UTIL_OBJS) $(GMO_FILES)
|
|
|
|
$(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS)))
|
|
|
|
|
|
|
|
# In the second step, we make a rule to actually create these directories
|
|
|
|
$(sort $(dir $(DIRECTORY_DEPS))):
|
|
|
|
$(ECHO) " MKDIR " $@
|
|
|
|
$(QUIET) $(MKDIR) -p $@ 2>/dev/null
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
clean:
|
2012-02-01 19:08:20 +08:00
|
|
|
-find $(OUTPUT) \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \
|
2011-03-30 22:30:11 +08:00
|
|
|
| xargs rm -f
|
2012-02-01 19:08:20 +08:00
|
|
|
-rm -f $(OUTPUT)cpupower
|
|
|
|
-rm -f $(OUTPUT)libcpupower.so*
|
2012-11-27 20:17:42 +08:00
|
|
|
-rm -rf $(OUTPUT)po/*.gmo
|
|
|
|
-rm -rf $(OUTPUT)po/*.pot
|
2012-02-01 19:08:20 +08:00
|
|
|
$(MAKE) -C bench O=$(OUTPUT) clean
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
install-lib:
|
|
|
|
$(INSTALL) -d $(DESTDIR)${libdir}
|
2012-02-01 19:08:20 +08:00
|
|
|
$(CP) $(OUTPUT)libcpupower.so* $(DESTDIR)${libdir}/
|
2011-03-30 22:30:11 +08:00
|
|
|
$(INSTALL) -d $(DESTDIR)${includedir}
|
|
|
|
$(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h
|
2016-04-28 21:24:40 +08:00
|
|
|
$(INSTALL_DATA) lib/cpuidle.h $(DESTDIR)${includedir}/cpuidle.h
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
install-tools:
|
|
|
|
$(INSTALL) -d $(DESTDIR)${bindir}
|
2012-02-01 19:08:20 +08:00
|
|
|
$(INSTALL_PROGRAM) $(OUTPUT)cpupower $(DESTDIR)${bindir}
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
install-man:
|
|
|
|
$(INSTALL_DATA) -D man/cpupower.1 $(DESTDIR)${mandir}/man1/cpupower.1
|
|
|
|
$(INSTALL_DATA) -D man/cpupower-frequency-set.1 $(DESTDIR)${mandir}/man1/cpupower-frequency-set.1
|
|
|
|
$(INSTALL_DATA) -D man/cpupower-frequency-info.1 $(DESTDIR)${mandir}/man1/cpupower-frequency-info.1
|
2014-05-13 18:41:42 +08:00
|
|
|
$(INSTALL_DATA) -D man/cpupower-idle-set.1 $(DESTDIR)${mandir}/man1/cpupower-idle-set.1
|
|
|
|
$(INSTALL_DATA) -D man/cpupower-idle-info.1 $(DESTDIR)${mandir}/man1/cpupower-idle-info.1
|
2011-03-30 22:30:11 +08:00
|
|
|
$(INSTALL_DATA) -D man/cpupower-set.1 $(DESTDIR)${mandir}/man1/cpupower-set.1
|
|
|
|
$(INSTALL_DATA) -D man/cpupower-info.1 $(DESTDIR)${mandir}/man1/cpupower-info.1
|
|
|
|
$(INSTALL_DATA) -D man/cpupower-monitor.1 $(DESTDIR)${mandir}/man1/cpupower-monitor.1
|
|
|
|
|
|
|
|
install-gmo:
|
|
|
|
$(INSTALL) -d $(DESTDIR)${localedir}
|
|
|
|
for HLANG in $(LANGUAGES); do \
|
2012-02-01 19:08:20 +08:00
|
|
|
echo '$(INSTALL_DATA) -D $(OUTPUT)po/$$HLANG.gmo $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo'; \
|
|
|
|
$(INSTALL_DATA) -D $(OUTPUT)po/$$HLANG.gmo $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo; \
|
2011-03-30 22:30:11 +08:00
|
|
|
done;
|
|
|
|
|
|
|
|
install-bench:
|
|
|
|
@#DESTDIR must be set from outside to survive
|
2012-02-01 19:08:20 +08:00
|
|
|
@sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$(confdir) $(MAKE) -C bench O=$(OUTPUT) install
|
2011-04-19 15:03:52 +08:00
|
|
|
|
2015-12-02 00:14:14 +08:00
|
|
|
ifeq ($(strip $(STATIC)),true)
|
|
|
|
install: all install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)
|
|
|
|
else
|
2011-03-30 22:30:11 +08:00
|
|
|
install: all install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)
|
2015-12-02 00:14:14 +08:00
|
|
|
endif
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
uninstall:
|
2011-04-21 23:50:25 +08:00
|
|
|
- rm -f $(DESTDIR)${libdir}/libcpupower.*
|
2011-03-30 22:30:11 +08:00
|
|
|
- rm -f $(DESTDIR)${includedir}/cpufreq.h
|
2016-04-28 21:24:40 +08:00
|
|
|
- rm -f $(DESTDIR)${includedir}/cpuidle.h
|
2011-03-30 22:30:11 +08:00
|
|
|
- rm -f $(DESTDIR)${bindir}/utils/cpupower
|
2014-05-13 18:41:40 +08:00
|
|
|
- rm -f $(DESTDIR)${mandir}/man1/cpupower.1
|
|
|
|
- rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-set.1
|
|
|
|
- rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-info.1
|
|
|
|
- rm -f $(DESTDIR)${mandir}/man1/cpupower-set.1
|
|
|
|
- rm -f $(DESTDIR)${mandir}/man1/cpupower-info.1
|
|
|
|
- rm -f $(DESTDIR)${mandir}/man1/cpupower-monitor.1
|
2011-03-30 22:30:11 +08:00
|
|
|
- for HLANG in $(LANGUAGES); do \
|
2011-04-21 23:50:26 +08:00
|
|
|
rm -f $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo; \
|
2011-03-30 22:30:11 +08:00
|
|
|
done;
|
|
|
|
|
2011-04-21 23:50:25 +08:00
|
|
|
.PHONY: all utils libcpupower update-po create-gmo install-lib install-tools install-man install-gmo install uninstall clean
|