diff options
author | Eugeni Dodonov <eugeni@dodonov.net> | 2011-08-26 13:04:19 -0300 |
---|---|---|
committer | Eugeni Dodonov <eugeni@dodonov.net> | 2011-08-26 13:04:19 -0300 |
commit | 5b9d1526bc32ec5fd43a9fbe93c241c943f87d3d (patch) | |
tree | 89561009028cb9da0b7f5c3f64e1b0fd30e9e65e | |
parent | 8abb944c5975a39303bbb40e508c695918ad7ca1 (diff) |
Added makefile for android cross-build
-rw-r--r-- | Makefile | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b39c5d1 --- /dev/null +++ b/Makefile @@ -0,0 +1,58 @@ +VERSION = 1.13 + +BINDIR=/usr/bin +LOCALESDIR=/usr/share/locale +MANDIR=/usr/share/man/man8 +WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int +CFLAGS?=-march=i686 -O2 -pipe -m32 ${WARNFLAGS} +CC?=gcc + +CFLAGS+=-D VERSION=\"$(VERSION)\" + +LDFLAGS+= -static + +# +# The w in -lncursesw is not a typo; it is the wide-character version +# of the ncurses library, needed for multi-byte character languages +# such as Japanese and Chinese etc. +# +# On Debian/Ubuntu distros, this can be found in the +# libncursesw5-dev package. +# + +OBJS = powertop.o config.o process.o misctips.o bluetooth.o display.o suggestions.o wireless.o cpufreq.o \ + sata.o xrandr.o ethernet.o cpufreqstats.o usb.o urbnum.o intelcstates.o wifi-new.o perf.o \ + alsa-power.o ahci-alpm.o dmesg.o devicepm.o + + +powertop: $(OBJS) Makefile powertop.h + $(CC) ${CFLAGS} $(LDFLAGS) $(OBJS) -lncursesw -o powertop + @(cd po/ && $(MAKE)) + +powertop.8.gz: powertop.8 + gzip -c $< > $@ + +install: powertop powertop.8.gz + mkdir -p ${DESTDIR}${BINDIR} + cp powertop ${DESTDIR}${BINDIR} + mkdir -p ${DESTDIR}${MANDIR} + cp powertop.8.gz ${DESTDIR}${MANDIR} + @(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@) + +valgrind: powertop + sudo valgrind ./powertop -d -t 5 1> /dev/null + +# This is for translators. To update your po with new strings, do : +# svn up ; make uptrans LG=fr # or de, ru, hu, it, ... +uptrans: + @(cd po/ && env LG=$(LG) $(MAKE) $@) + +clean: + rm -f *~ powertop powertop.8.gz po/powertop.pot DEADJOE svn-commit* *.o *.orig + @(cd po/ && $(MAKE) $@) + + +dist: + git tag v$(VERSION) + git archive --format=tar --prefix="powertop-$(VERSION)/" v$(VERSION) | \ + gzip > powertop-$(VERSION).tar.gz |