Makefile - tty-clock - port of tty-clock to OpenBSD, with pledge/unveil added as goodie
HTML git clone https://git.drkhsh.at/tty-clock.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
Makefile (944B)
---
1 #TTY-Clock MakeFile
2 #Under BSD License
3 #See clock.c for the license detail.
4
5 SRC = ttyclock.c
6 CC ?= gcc
7 BIN ?= tty-clock
8 PREFIX ?= /usr/local
9 INSTALLPATH ?= ${DESTDIR}${PREFIX}/bin
10 MANPATH ?= ${DESTDIR}${PREFIX}/share/man/man1
11
12 CFLAGS += -Wall -g
13 LDFLAGS += -lncurses
14
15 tty-clock : ${SRC}
16 @echo "building ${SRC}"
17 ${CC} ${CFLAGS} ${SRC} -o ${BIN} ${LDFLAGS}
18
19 install : ${BIN}
20
21 @echo "installing binary file to ${INSTALLPATH}/${BIN}"
22 @mkdir -p ${INSTALLPATH}
23 @cp -f ${BIN} ${INSTALLPATH}
24 @chmod 0755 ${INSTALLPATH}/${BIN}
25 @echo "installing manpage to ${MANPATH}/${BIN}.1"
26 @mkdir -p ${MANPATH}
27 @cp ${BIN}.1 ${MANPATH}
28 @chmod 0644 ${MANPATH}/${BIN}.1
29 @echo "installed"
30
31 uninstall :
32
33 @echo "uninstalling binary file (${INSTALLPATH})"
34 @rm -f ${INSTALLPATH}/${BIN}
35 @echo "uninstalling manpage (${MANPATH})"
36 @rm -f ${MANPATH}/${BIN}.1
37 @echo "${BIN} uninstalled"
38
39 clean :
40
41 @echo "cleaning ${BIN}"
42 @rm -f ${BIN}
43 @echo "${BIN} cleaned"
44