Marcin Juszkiewicz | 807e4fa | 2011-01-12 17:25:16 -0600 | [diff] [blame] | 1 | BINDIR=/usr/sbin |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 2 | MANDIR=/usr/share/man/man8 |
| 3 | |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 4 | WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 5 | CFLAGS?=-O1 -g ${WARNFLAGS} |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 6 | CC?=gcc |
| 7 | |
Amit Arora | 1755278 | 2010-12-02 12:23:14 +0530 | [diff] [blame] | 8 | OBJS = powerdebug.o sensor.o clocks.o regulator.o display.o |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 9 | |
| 10 | default: powerdebug |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 11 | |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 12 | powerdebug.8.gz: powerdebug.8 |
| 13 | gzip -c $< > $@ |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 14 | |
| 15 | powerdebug: $(OBJS) powerdebug.h |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 16 | $(CC) ${CFLAGS} $(OBJS) -lncurses -o powerdebug |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 17 | |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 18 | install: powerdebug powerdebug.8.gz |
Marcin Juszkiewicz | 807e4fa | 2011-01-12 17:25:16 -0600 | [diff] [blame] | 19 | install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR} |
| 20 | install -m 0755 powerdebug ${DESTDIR}${BINDIR} |
| 21 | install -m 0644 powerdebug.8.gz ${DESTDIR}${MANDIR} |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 22 | |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 23 | all: powerdebug powerdebug.8.gz |
| 24 | |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 25 | clean: |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 26 | rm -f powerdebug *.o powerdebug.8.gz |