blob: 0ac486dfb881c72ead16f52094adcff23258d9f3 [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
Amit Arorae9e16b02010-08-03 10:15:20 +05304WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
Amit Arora39f29542010-09-14 12:03:22 +05305CFLAGS?=-O1 -g ${WARNFLAGS}
Amit Arorae9e16b02010-08-03 10:15:20 +05306CC?=gcc
7
Amit Arora17552782010-12-02 12:23:14 +05308OBJS = powerdebug.o sensor.o clocks.o regulator.o display.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:
Amit Arora39f29542010-09-14 12:03:22 +053026 rm -f powerdebug *.o powerdebug.8.gz