JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed backspace problem, updated terminfo entry and moved TNAME in config.h.
[st.git] / Makefile
1 # st - simple terminal
2 # See LICENSE file for copyright and license details.
3
4 include config.mk
5
6 SRC = st.c
7 OBJ = ${SRC:.c=.o}
8
9 all: options st
10
11 options:
12         @echo st build options:
13         @echo "CFLAGS   = ${CFLAGS}"
14         @echo "LDFLAGS  = ${LDFLAGS}"
15         @echo "CC       = ${CC}"
16
17 .c.o:
18         @echo CC $<
19         @${CC} -c ${CFLAGS} $<
20
21 ${OBJ}: config.h config.mk
22
23 st: ${OBJ}
24         @echo CC -o $@
25         @${CC} -o $@ ${OBJ} ${LDFLAGS}
26
27 clean:
28         @echo cleaning
29         @rm -f st ${OBJ} st-${VERSION}.tar.gz
30
31 dist: clean
32         @echo creating dist tarball
33         @mkdir -p st-${VERSION}
34         @cp -R LICENSE Makefile README config.mk st.h ${SRC} st-${VERSION}
35         @tar -cf st-${VERSION}.tar st-${VERSION}
36         @gzip st-${VERSION}.tar
37         @rm -rf st-${VERSION}
38
39 install: all
40         @echo installing executable file to ${DESTDIR}${PREFIX}/bin
41         @mkdir -p ${DESTDIR}${PREFIX}/bin
42         @cp -f st ${DESTDIR}${PREFIX}/bin
43         @chmod 755 ${DESTDIR}${PREFIX}/bin/st
44         @tic st.info
45
46 uninstall:
47         @echo removing executable file from ${DESTDIR}${PREFIX}/bin
48         @rm -f ${DESTDIR}${PREFIX}/bin/st
49
50 .PHONY: all options clean dist install uninstall