Makefile - smu - smu - simple markup (Markdown) processor (fork, fixes + features) (HTM) git clone git://git.codemadness.org/smu (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- Makefile (1036B) --- 1 .POSIX: 2 3 NAME = smu 4 VERSION = 1.5 5 6 # paths 7 PREFIX = /usr/local 8 MANPREFIX = ${PREFIX}/share/man 9 10 # flags 11 SMU_CFLAGS = -DVERSION=\"${VERSION}\" ${CFLAGS} 12 SMU_LDFLAGS = ${LDFLAGS} 13 14 SRC = ${NAME}.c 15 OBJ = ${SRC:.c=.o} 16 BIN = ${NAME} 17 MAN1 = ${NAME}.1 18 19 all: ${BIN} 20 21 .c.o: 22 ${CC} -c ${SMU_CFLAGS} $< 23 24 ${OBJ}: 25 26 ${BIN}: ${OBJ} 27 ${CC} -o $@ ${OBJ} ${SMU_LDFLAGS} 28 29 clean: 30 rm -f ${BIN} ${OBJ} "${NAME}-${VERSION}.tar.gz" 31 32 dist: clean 33 mkdir -p "${NAME}-${VERSION}" 34 cp -R LICENSE README testdoc Makefile ${MAN1} ${SRC} "${NAME}-${VERSION}" 35 tar -cf - "${NAME}-${VERSION}" | \ 36 gzip -c > "${NAME}-${VERSION}.tar.gz" 37 rm -rf "${NAME}-${VERSION}" 38 39 install: all 40 mkdir -p "${DESTDIR}${PREFIX}/bin" 41 cp -f ${BIN} "${DESTDIR}${PREFIX}/bin" 42 chmod 755 "${DESTDIR}${PREFIX}/bin/${BIN}" 43 mkdir -p "${DESTDIR}${MANPREFIX}/man1" 44 cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1" 45 chmod 644 "${DESTDIR}${MANPREFIX}/man1/${MAN1}" 46 47 uninstall: 48 rm -f "${DESTDIR}${PREFIX}/bin/${BIN}" \ 49 "${DESTDIR}${MANPREFIX}/man1/${MAN1}" 50 51 .PHONY: all clean dist install uninstall