JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
capabilities sorted by capname in st.info. copy acsc from xterm.
[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 config.h:
18         cp config.def.h config.h
19
20 .c.o:
21         @echo CC $<
22         @${CC} -c ${CFLAGS} $<
23
24 ${OBJ}: config.h config.mk
25
26 st: ${OBJ}
27         @echo CC -o $@
28         @${CC} -o $@ ${OBJ} ${LDFLAGS}
29
30 clean:
31         @echo cleaning
32         @rm -f st ${OBJ} st-${VERSION}.tar.gz
33
34 dist: clean
35         @echo creating dist tarball
36         @mkdir -p st-${VERSION}
37         @cp -R LICENSE Makefile README config.mk config.h st.info ${SRC} st-${VERSION}
38         @tar -cf st-${VERSION}.tar st-${VERSION}
39         @gzip st-${VERSION}.tar
40         @rm -rf st-${VERSION}
41
42 install: all
43         @echo installing executable file to ${DESTDIR}${PREFIX}/bin
44         @mkdir -p ${DESTDIR}${PREFIX}/bin
45         @cp -f st ${DESTDIR}${PREFIX}/bin
46         @chmod 755 ${DESTDIR}${PREFIX}/bin/st
47         @tic -s st.info
48
49 uninstall:
50         @echo removing executable file from ${DESTDIR}${PREFIX}/bin
51         @rm -f ${DESTDIR}${PREFIX}/bin/st
52
53 .PHONY: all options clean dist install uninstall