diff options
author | Erik K <erikk@previousplan.org> | 2022-05-13 17:24:26 +0000 |
---|---|---|
committer | Erik K <erikk@previousplan.org> | 2022-05-13 17:24:26 +0000 |
commit | b2fada1dd19211d71e04557653d08e697134a6ce (patch) | |
tree | 063b6d1280193046321db1e53506be5b72d2220f /Makefile |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
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} |