From b2fada1dd19211d71e04557653d08e697134a6ce Mon Sep 17 00:00:00 2001 From: Erik K Date: Fri, 13 May 2022 17:24:26 +0000 Subject: initial commit --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2dd9aca --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +include config.mk +SRC = sm.c util.c ${PLUGINS} +OBJ = ${SRC:.c=.o} + +sm: ${OBJ} + ${CC} ${LDFLAGS} -o sm ${OBJ} + +.c.o: + ${CC} ${CFLAGS} -c $< + +${OBJ}: config.h plugins.h + +plugins.h: ${PLUGINS} + printf '%s\n' ${PLUGINS:.c=} | awk -f genplugin.awk + +install: + install -dm 0755 ${DESTDIR}${PREFIX}/bin + install -m 0755 sm ${DESTDIR}${PREFIX}/bin + +uninstall: + rm -f ${DESTDIR}${PREFIX}/bin/sm + +clean: + rm -f sm plugins.h ${OBJ} -- cgit v1.2.3