summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 9c221a9cfb5d6c4af5b36d0e78305658b8c720e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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: config.mk
	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}