aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAmit Arora <amit.arora@linaro.org>2010-09-14 12:03:22 +0530
committerAmit Arora <amit.arora@linaro.org>2010-09-14 12:03:22 +0530
commit39f2954961126dbe0eb1b63cef6cd1840f5c0dce (patch)
tree9a959eae7271daa8298e5d44a58610c4f9ddb927 /Makefile
parent47fd91858480465f80e86c9230fd98113f47cba1 (diff)
Version 0.1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 15 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b54141e..ac4d871 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,25 @@
+BINDIR=/usr/bin
+MANDIR=/usr/share/man/man8
+
WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
-CFLAGS?=-O1 -g ${WARNFLAGS} -lncurses
+CFLAGS?=-O1 -g ${WARNFLAGS}
CC?=gcc
OBJS = powerdebug.o output.o sensor.o display.o
+powerdebug.8.gz: powerdebug.8
+ gzip -c $< > $@
powerdebug: $(OBJS) powerdebug.h
- $(CC) ${CFLAGS} $(OBJS) -o powerdebug
+ $(CC) ${CFLAGS} $(OBJS) -lncurses -o powerdebug
+
+install: powerdebug powerdebug.8.gz
+ mkdir -p ${DESTDIR}${BINDIR}
+ cp powerdebug ${DESTDIR}${BINDIR}
+ mkdir -p ${DESTDIR}${MANDIR}
+ cp powerdebug.8.gz ${DESTDIR}${MANDIR}
-All: powerdebug
+All: install
clean:
- rm -f powerdebug *.o
+ rm -f powerdebug *.o powerdebug.8.gz