Makefile - sent - simple plaintext presentation tool
(HTM) git clone git://git.suckless.org/sent
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
Makefile (1121B)
---
1 # sent - plain text presentation tool
2 # See LICENSE file for copyright and license details.
3
4 include config.mk
5
6 SRC = sent.c drw.c util.c
7 OBJ = ${SRC:.c=.o}
8
9 all: options sent
10
11 options:
12 @echo sent build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
15 @echo "CC = ${CC}"
16
17 config.h:
18 cp config.def.h config.h
19
20 .c.o:
21 ${CC} -c ${CFLAGS} $<
22
23 ${OBJ}: config.h config.mk
24
25 sent: ${OBJ}
26 ${CC} -o $@ ${OBJ} ${LDFLAGS}
27
28 cscope: ${SRC} config.h
29 cscope -R -b || echo cScope not installed
30
31 clean:
32 rm -f sent ${OBJ} sent-${VERSION}.tar.gz
33
34 dist: clean
35 mkdir -p sent-${VERSION}
36 cp -R LICENSE Makefile config.mk config.def.h ${SRC} sent-${VERSION}
37 tar -cf sent-${VERSION}.tar sent-${VERSION}
38 gzip sent-${VERSION}.tar
39 rm -rf sent-${VERSION}
40
41 install: all
42 mkdir -p ${DESTDIR}${PREFIX}/bin
43 cp -f sent ${DESTDIR}${PREFIX}/bin
44 chmod 755 ${DESTDIR}${PREFIX}/bin/sent
45 mkdir -p ${DESTDIR}${MANPREFIX}/man1
46 cp sent.1 ${DESTDIR}${MANPREFIX}/man1/sent.1
47 chmod 644 ${DESTDIR}${MANPREFIX}/man1/sent.1
48
49 uninstall:
50 rm -f ${DESTDIR}${PREFIX}/bin/sent
51
52 .PHONY: all options clean dist install uninstall cscope