aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 4c5a416f03c59294a8bea0778bd5d514b8544cc1 (plain) (blame)
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
.POSIX:

CFLAGS  = \
	-Wall -Wextra -Wpedantic -Werror \
	-O3 -march=native -mtune=native -fomit-frame-pointer \
	-std=c11 -pipe
LDFLAGS = -llux

PREFIX  = /usr
DPREFIX = ${DESTDIR}${PREFIX}
MANDIR  = ${DPREFIX}/share/man

target = lux

all: ${target}
${target}: ${target}.c
	${CC} ${CFLAGS} ${LDFLAGS} -o $@ $<

install:
	mkdir -p ${DPREFIX}/bin ${MANDIR}/man1
	cp ${target} ${DPREFIX}/bin
	cp *.1 ${MANDIR}/man1

clean:
	rm -f ${target}