diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5048a28 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +include config.mk + +SRC = donut.c +OBJ = ${SRC:.c=.o} + +all: options donut + +options: + @echo donut build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" + +.c.o: + ${CC} -c ${CFLAGS} $< + +${OBJ}: config.h config.mk + +config.h: + cp config.def.h $@ + +donut: ${OBJ} + ${CC} -o $@ ${OBJ} ${LDFLAGS} + +clean: + rm -f donut ${OBJ} + +install: all + mkdir -p ${DESTDIR}${PREFIX}/bin + cp -f donut ${DESTDIR}${PREFIX}/bin + chmod 755 ${DESTDIR}${PREFIX}/bin/donut + +uninstall: + rm -f ${DESTDIR}${PREFIX}/bin/donut + +.PHONY: all options clean install uninstall |