aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 8e25946c0533aa8fb718316017e1636fe2876398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
BINDIR=/usr/bin
MANDIR=/usr/share/man/man8

WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
CFLAGS?=-O1 -g ${WARNFLAGS}
CC?=gcc

OBJS = powerdebug.o output.o sensor.o clocks.o display.o

default: powerdebug

powerdebug.8.gz: powerdebug.8
	gzip -c $< > $@

powerdebug: $(OBJS) powerdebug.h
	$(CC) ${CFLAGS} $(OBJS) -lncurses -o powerdebug

install: powerdebug powerdebug.8.gz
	mkdir -p ${DESTDIR}${BINDIR}
	cp powerdebug ${DESTDIR}${BINDIR}
	mkdir -p ${DESTDIR}${MANDIR}
	cp powerdebug.8.gz ${DESTDIR}${MANDIR}

All: install

all: powerdebug powerdebug.8.gz

clean:
	rm -f powerdebug *.o powerdebug.8.gz