30 lines
431 B
Makefile
30 lines
431 B
Makefile
|
include config.mk
|
||
|
|
||
|
SRCS = ${PROG}.c
|
||
|
OBJS = ${SRCS:.c=.o}
|
||
|
|
||
|
all: ${PROG}
|
||
|
|
||
|
${PROG}: ${OBJS}
|
||
|
${CC} -o $@ ${OBJS} ${LDFLAGS}
|
||
|
|
||
|
${OBJS}: config.h
|
||
|
|
||
|
config.h: config.def.h
|
||
|
cp config.def.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
|