27 lines
387 B
Makefile
27 lines
387 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 ${DESTDIR}${PREFIX}/bin/
|
|
install -m 755 ${PROG} ${DESTDIR}${PREFIX}/bin/
|
|
|
|
uninstall:
|
|
rm -f ${DESTDIR}${PREFIX}/bin/${PROG}
|
|
|
|
.PHONY: all clean install uninstall
|