summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 2dd9aca419f6a21c6f26a2d77d74ddc5f0534529 (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: ${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}