Makefile (886B)
1 # lsw - list window names 2 # See LICENSE file for copyright and license details. 3 .POSIX: 4 5 include config.mk 6 7 SRC = lsw.c 8 OBJ = ${SRC:.c=.o} 9 10 all: lsw 11 12 .c.o: 13 ${CC} -c ${CFLAGS} $< 14 15 lsw: ${OBJ} 16 ${CC} -o $@ ${OBJ} ${LDFLAGS} 17 18 clean: 19 rm -f lsw ${OBJ} lsw-${VERSION}.tar.gz 20 21 dist: clean 22 mkdir -p lsw-${VERSION} 23 cp -R LICENSE Makefile README config.mk lsw.1 ${SRC} lsw-${VERSION} 24 tar -cf lsw-${VERSION}.tar lsw-${VERSION} 25 gzip lsw-${VERSION}.tar 26 rm -rf lsw-${VERSION} 27 28 install: all 29 mkdir -p ${DESTDIR}${PREFIX}/bin 30 cp -f lsw ${DESTDIR}${PREFIX}/bin 31 chmod 755 ${DESTDIR}${PREFIX}/bin/lsw 32 mkdir -p ${DESTDIR}${MANPREFIX}/man1 33 sed "s/VERSION/${VERSION}/g" < lsw.1 > ${DESTDIR}${MANPREFIX}/man1/lsw.1 34 chmod 644 ${DESTDIR}${MANPREFIX}/man1/lsw.1 35 36 uninstall: 37 rm -f ${DESTDIR}${PREFIX}/bin/lsw 38 rm -f ${DESTDIR}${MANPREFIX}/man1/lsw.1 39 40 .PHONY: all options clean dist install uninstall