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 | 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 |
| 19 | mkdir -p ${DESTDIR}${BINDIR} |
| 20 | cp powerdebug ${DESTDIR}${BINDIR} |
| 21 | mkdir -p ${DESTDIR}${MANDIR} |
| 22 | cp powerdebug.8.gz ${DESTDIR}${MANDIR} |
| 23 | |
| 24 | All: install |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 25 | |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 26 | all: powerdebug powerdebug.8.gz |
| 27 | |
Amit Arora | e9e16b0 | 2010-08-03 10:15:20 +0530 | [diff] [blame] | 28 | clean: |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 29 | rm -f powerdebug *.o powerdebug.8.gz |