From 6fc8dc4909b01ba7922385e669d083ab74e26f0d Mon Sep 17 00:00:00 2001 From: turret Date: Fri, 23 Jun 2023 00:44:15 -0500 Subject: initial commit --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3