28 lines
472 B
Makefile
28 lines
472 B
Makefile
include config.mk
|
|
|
|
SRCS = ${PROG}.c
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
all: ${PROG}
|
|
|
|
${PROG}: ${OBJS}
|
|
${CC} -o $@ ${OBJS} ${LDFLAGS}
|
|
|
|
${OBJS}: config.h
|
|
|
|
.c.o:
|
|
${CC} ${CFLAGS} -c $<
|
|
|
|
clean:
|
|
-rm ${OBJS} ${PROG}
|
|
|
|
install: all
|
|
install -D -m 755 ${PROG} ${DESTDIR}${PREFIX}/bin/${PROG}
|
|
install -D -m 644 ${PROG}.1 ${DESTDIR}${MANPREFIX}/man1/${PROG}.1
|
|
|
|
uninstall:
|
|
rm -f ${DESTDIR}${PREFIX}/bin/${PROG}
|
|
rm -f ${DESTDIR}${MANPREFIX}/man1/${PROG}.1
|
|
|
|
.PHONY: all clean install uninstall
|