-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (39 loc) · 1009 Bytes
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
CC = g++
CFLAGS = -march=native -O3 -s -lm -lpthread -Wfatal-errors -Werror -std=c++11
CFLAGS += -Wall -pedantic
PREFIX = /usr/bin
TOOL = docolav
DOCDIR = /usr/share/doc/${TOOL}
MAN = /usr/share/man/man1
all:
${CC} ${CFLAGS} src/${TOOL}.cc -o ${TOOL}
clean:
rm -f ${TOOL}
help:
@echo make
@echo " compile ${TOOL}"
@echo
@echo make clean
@echo " purge les fichiers de compilation"
@echo
@echo make install
@echo " installe ${TOOL} et sa documentation"
@echo
@echo make man
@echo " génère la page du manuel"
@echo
@echo make uninstall
@echo " supprime ${TOOL} et sa documentation"
install:
install -s ${TOOL} ${PREFIX}
mkdir -p ${DOCDIR}
chmod 755 ${DOCDIR}
install -m 644 -t ${DOCDIR} CHANGELOG LICENSE README.md REQUIREMENTS
install -m 644 -t ${MAN} ${TOOL}.1.gz
man:
@rm -f docolav.1.gz
help2man -L=utf-8 -N --name="couleur moyenne dominante d'une image" ./docolav -o docolav.1.gz
uninstall:
rm -f ${PREFIX}/${TOOL}
rm -rf ${DOCDIR}
rm -f ${MAN}/${TOOL}.1.gz