2 # See LICENSE file for copyright and license details.
12 @echo st build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
19 @${CC} -c ${CFLAGS} $<
21 ${OBJ}: config.h config.mk
24 @echo creating $@ from config.def.h
29 @${CC} -o $@ ${OBJ} ${LDFLAGS}
33 @rm -f st ${OBJ} st-${VERSION}.tar.gz
36 @echo creating dist tarball
37 @mkdir -p st-${VERSION}
38 @cp -R LICENSE Makefile README config.def.h config.mk \
39 st.1 ${SRC} st-${VERSION}
40 @tar -cf st-${VERSION}.tar st-${VERSION}
41 @gzip st-${VERSION}.tar
45 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
46 @mkdir -p ${DESTDIR}${PREFIX}/bin
47 @cp -f st ${DESTDIR}${PREFIX}/bin
48 @chmod 755 ${DESTDIR}${PREFIX}/bin/st
49 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
50 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
51 @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
52 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
55 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
56 @rm -f ${DESTDIR}${PREFIX}/bin/st
57 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
58 @rm -f ${DESTDIR}${MANPREFIX}/man1/st.1
60 .PHONY: all options clean dist install uninstall