Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame^] | 1 | BINDIR=/usr/bin |
| 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 | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 8 | OBJS = powerdebug.o output.o sensor.o display.o |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 9 | |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame^] | 10 | powerdebug.8.gz: powerdebug.8 |
| 11 | gzip -c $< > $@ |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 12 | |
| 13 | powerdebug: $(OBJS) powerdebug.h |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame^] | 14 | $(CC) ${CFLAGS} $(OBJS) -lncurses -o powerdebug |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 15 | |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame^] | 16 | install: powerdebug powerdebug.8.gz |
| 17 | mkdir -p ${DESTDIR}${BINDIR} |
| 18 | cp powerdebug ${DESTDIR}${BINDIR} |
| 19 | mkdir -p ${DESTDIR}${MANDIR} |
| 20 | cp powerdebug.8.gz ${DESTDIR}${MANDIR} |
| 21 | |
| 22 | All: install |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 23 | |
| 24 | clean: |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame^] | 25 | rm -f powerdebug *.o powerdebug.8.gz |