[remove] termbox parse_mouse_event()
[sfm.git] / Makefile
blobdae243f3b6cfe9abfd60205008a7708ccfb25d34
1 # sfm - simple file manager
2 # See LICENSE file for copyright and license details.
4 include config.mk
6 SRC = sfm.c util.c termbox.c utf8.c
7 OBJ = ${SRC:.c=.o}
9 all: options sfm
11 options:
12 @echo sfm build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
15 @echo "CC = ${CC}"
17 .c.o:
18 ${CC} -c ${CFLAGS} $<
20 ${OBJ}: config.h config.mk
22 config.h:
23 cp config.def.h $@
25 sfm: ${OBJ}
26 ${CC} ${LDFLAGS} -o $@ ${OBJ}
28 clean:
29 rm -f sfm ${OBJ} sfm-${VERSION}.tar.gz
31 dist: clean
32 mkdir -p sfm-${VERSION}
33 cp -R LICENSE Makefile README.md config.def.h config.mk\
34 sfm.1 sfm.png termbox.h util.h ${SRC} sfm-${VERSION}
35 tar -cf sfm-${VERSION}.tar sfm-${VERSION}
36 gzip sfm-${VERSION}.tar
37 rm -rf sfm-${VERSION}
39 install: sfm
40 mkdir -p ${DESTDIR}${PREFIX}/bin
41 cp -f sfm ${DESTDIR}${PREFIX}/bin
42 chmod 755 ${DESTDIR}${PREFIX}/bin/sfm
43 mkdir -p ${DESTDIR}${MANPREFIX}/man1
44 sed "s/VERSION/${VERSION}/g" < sfm.1 > ${DESTDIR}${MANPREFIX}/man1/sfm.1
45 chmod 644 ${DESTDIR}${MANPREFIX}/man1/sfm.1
47 uninstall:
48 rm -f ${DESTDIR}${PREFIX}/bin/sfm\
49 ${DESTDIR}${MANPREFIX}/man1/sfm.1
51 .PHONY: all options clean dist install uninstall