Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261776
b: refs/heads/master
c: 7443af9
h: refs/heads/master
v: v3
  • Loading branch information
Dominik Brodowski committed Jul 29, 2011
1 parent 158b97b commit 70fbda8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 412 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5db37fa0a84a6fd05e669dae3a706fa84012f73
refs/heads/master: 7443af9c9b99ed8eb1eb4496ca1769adba64776b
6 changes: 4 additions & 2 deletions trunk/tools/power/cpupower/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ lib/proc.o
lib/sysfs.lo
lib/sysfs.o
libcpufreq.la
po/cpufrequtils.pot
po/cpupowerutils.pot
po/*.gmo
utils/cpufreq-info.o
utils/cpufreq-set.o
utils/cpufreq-aperf.o
utils/cpufreq-aperf.o
cpupower
bench/cpufreq-bench
31 changes: 15 additions & 16 deletions trunk/tools/power/cpupower/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# Set the following to `true' to make a unstripped, unoptimized
# binary. Leave this set to `false' for production use.
DEBUG ?= true
DEBUG ?= false

# make the build silent. Set this to something else to make it noisy again.
V ?= false
Expand Down Expand Up @@ -145,12 +145,13 @@ endif
CFLAGS += $(WARNINGS)

ifeq ($(strip $(V)),false)
QUIET=@$(PWD)/build/ccdv
HOST_PROGS=build/ccdv
QUIET=@
ECHO=@echo
else
QUIET=
HOST_PROGS=
ECHO=@\#
endif
export QUIET ECHO

# if DEBUG is enabled, then we do not strip or optimize
ifeq ($(strip $(DEBUG)),true)
Expand All @@ -165,17 +166,14 @@ endif

# the actual make rules

all: ccdv libcpufreq cpupower $(COMPILE_NLS) $(COMPILE_BENCH)
all: libcpufreq cpupower $(COMPILE_NLS) $(COMPILE_BENCH)

ccdv: build/ccdv
build/ccdv: build/ccdv.c
@echo "Building ccdv"
@$(HOSTCC) -O1 $< -o $@

lib/%.o: $(LIB_SRC) $(LIB_HEADERS) build/ccdv
lib/%.o: $(LIB_SRC) $(LIB_HEADERS)
$(ECHO) " CC " $@
$(QUIET) $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ -c lib/$*.c

libcpufreq.so.$(LIB_MAJ): $(LIB_OBJS)
$(ECHO) " LD " $@
$(QUIET) $(CC) -shared $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
-Wl,-soname,libcpufreq.so.$(LIB_MIN) $(LIB_OBJS)
@ln -sf $@ libcpufreq.so
Expand All @@ -188,11 +186,13 @@ libcpufreq: libcpufreq.so.$(LIB_MAJ)
$(UTIL_OBJS): $(UTIL_HEADERS)

.c.o:
$(ECHO) " CC " $@
$(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -I./lib -I ./utils -o $@ -c $*.c

cpupower: $(UTIL_OBJS) libcpufreq
cpupower: $(UTIL_OBJS) libcpufreq.so.$(LIB_MAJ)
$(ECHO) " CC " $@
$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -lcpufreq -lrt -lpci -L. -o $@ $(UTIL_OBJS)
$(STRIPCMD) $@
$(QUIET) $(STRIPCMD) $@

po/$(PACKAGE).pot: $(UTIL_SRC)
@xgettext --default-domain=$(PACKAGE) --add-comments \
Expand Down Expand Up @@ -223,7 +223,6 @@ clean:
-rm -f $(IDLE_OBJS)
-rm -f cpupower
-rm -f libcpufreq.so*
-rm -f build/ccdv
-rm -rf po/*.gmo po/*.pot
$(MAKE) -C bench clean

Expand Down Expand Up @@ -256,7 +255,7 @@ install-gmo:
install-bench:
@#DESTDIR must be set from outside to survive
@sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$(confdir) $(MAKE) -C bench install

install: all install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)

uninstall:
Expand All @@ -269,5 +268,5 @@ uninstall:
rm -f $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupowerutils.mo; \
done;

.PHONY: all utils libcpufreq ccdv update-po update-gmo install-lib install-tools install-man install-gmo install uninstall \
.PHONY: all utils libcpufreq update-po update-gmo install-lib install-tools install-man install-gmo install uninstall \
clean
11 changes: 5 additions & 6 deletions trunk/tools/power/cpupower/bench/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ LIBS = -L../ -lm -lcpufreq
OBJS = main.o parse.o system.o benchmark.o
CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\"

ifeq ($(strip $(V)),false)
CC=@../build/ccdv gcc
else
CC=gcc
endif
%.o : %.c
$(ECHO) " CC " $@
$(QUIET) $(CC) -c $(CFLAGS) $< -o $@

cpufreq-bench: $(OBJS)
$(CC) -o $@ $(CFLAGS) $(OBJS) $(LIBS)
$(ECHO) " CC " $@
$(QUIET) $(CC) -o $@ $(CFLAGS) $(OBJS) $(LIBS)

all: cpufreq-bench

Expand Down
Loading

0 comments on commit 70fbda8

Please sign in to comment.