blob: 2da9d67cc097144f764eef3bbae73888a3745762 [file] [log] [blame]
Marcin Juszkiewicz807e4fa2011-01-12 17:25:16 -06001BINDIR=/usr/sbin
Amit Arora39f29542010-09-14 12:03:22 +05302MANDIR=/usr/share/man/man8
3
Daniel Lezcano00af33e2011-05-24 15:27:49 +02004CFLAGS?=-O1 -g -Wall -Wshadow
Amit Arorae9e16b02010-08-03 10:15:20 +05305CC?=gcc
6
Daniel Lezcano03fc66b2011-08-25 15:46:13 +02007OBJS = powerdebug.o sensor.o clocks.o regulator.o gpio.o \
Daniel Lezcano8be52602011-06-21 00:57:08 +02008 display.o tree.o utils.o mainloop.o
Amit Arora728e0c92010-09-14 12:06:09 +05309
10default: powerdebug
Amit Arorae9e16b02010-08-03 10:15:20 +053011
Amit Arora39f29542010-09-14 12:03:22 +053012powerdebug.8.gz: powerdebug.8
13 gzip -c $< > $@
Amit Arorae9e16b02010-08-03 10:15:20 +053014
15powerdebug: $(OBJS) powerdebug.h
Amit Arora39f29542010-09-14 12:03:22 +053016 $(CC) ${CFLAGS} $(OBJS) -lncurses -o powerdebug
Amit Arorae9e16b02010-08-03 10:15:20 +053017
Amit Arora39f29542010-09-14 12:03:22 +053018install: powerdebug powerdebug.8.gz
Marcin Juszkiewicz807e4fa2011-01-12 17:25:16 -060019 install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}
20 install -m 0755 powerdebug ${DESTDIR}${BINDIR}
21 install -m 0644 powerdebug.8.gz ${DESTDIR}${MANDIR}
Amit Arorae9e16b02010-08-03 10:15:20 +053022
Amit Arora728e0c92010-09-14 12:06:09 +053023all: powerdebug powerdebug.8.gz
24
Amit Arorae9e16b02010-08-03 10:15:20 +053025clean:
Daniel Lezcano00af33e2011-05-24 15:27:49 +020026 rm -f powerdebug ${OBJS} powerdebug.8.gz