diff options
author | turret <turret@duck.com> | 2023-06-23 00:44:15 -0500 |
---|---|---|
committer | turret <turret@duck.com> | 2023-06-23 00:44:15 -0500 |
commit | 6fc8dc4909b01ba7922385e669d083ab74e26f0d (patch) | |
tree | 00847ba5c97b94a3dade47b7abf8b7dcb86f2d0c /Makefile | |
download | donut-f6277e1322862caf0cfe7d50a2474f91f196a2eb.tar.gz donut-f6277e1322862caf0cfe7d50a2474f91f196a2eb.tar.bz2 donut-f6277e1322862caf0cfe7d50a2474f91f196a2eb.zip |
initial commitv1
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 |