Makefile - gopher-validator - Simple gopher menu validator. HTML git clone git://bitreich.org/gopher-validator git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-validator DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- Makefile (1338B) --- 1 .POSIX: 2 3 # paths 4 PREFIX = /usr/local 5 MANPREFIX = ${PREFIX}/man 6 7 # compiler and linker 8 CC = cc 9 10 NAME = gopher-validator 11 VERSION = 0.1 12 BIN = ${NAME} 13 SRC = ${BIN:=.c} 14 OBJ = ${BIN:=.o} 15 MAN1 = ${BIN:=.1} 16 DOC = LICENSE README 17 18 # build static: useful in a chroot. 19 #LDFLAGS += -static 20 # Linux 21 #CPPFLAGS += -D_DEFAULT_SOURCE 22 23 all: ${BIN} 24 25 ${BIN}: ${OBJ} 26 ${CC} -o $@ ${OBJ} ${LDFLAGS} 27 28 ${OBJ}: Makefile 29 30 clean: 31 rm -f ${BIN} ${OBJ} 32 33 install: 34 # installing executable files and scripts. 35 mkdir -p "${DESTDIR}${PREFIX}/bin" 36 cp -f ${BIN} "${DESTDIR}${PREFIX}/bin" 37 for f in ${BIN}; do chmod 755 "${DESTDIR}${PREFIX}/bin/$$f"; done 38 # installing manual pages for general commands: section 1. 39 mkdir -p "${DESTDIR}${MANPREFIX}/man1" 40 cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1" 41 for m in ${MAN1}; do chmod 644 "${DESTDIR}${MANPREFIX}/man1/$$m"; done 42 43 uninstall: 44 # removing executable files and scripts. 45 for f in ${BIN}; do rm -f "${DESTDIR}${PREFIX}/bin/$$f"; done 46 # removing manual pages. 47 for m in ${MAN1}; do rm -f "${DESTDIR}${MANPREFIX}/man1/$$m"; done 48 49 dist: 50 rm -rf "${NAME}-${VERSION}" 51 mkdir -p "${NAME}-${VERSION}" 52 cp -f ${DOC} ${MAN1} ${SRC} Makefile "${NAME}-${VERSION}" 53 # make tarball 54 tar -cf - "${NAME}-${VERSION}" | \ 55 gzip -c > "${NAME}-${VERSION}.tar.gz" 56 rm -rf "${NAME}-${VERSION}" 57 58 59 .PHONY: all clean dist install uninstall