---
tMakefile (540B)
---
1 .POSIX:
2
3 NAME = vote
4
5 PREFIX ?= /var/www/cgi-bin
6 HERE_CFLAGS = ${CFLAGS}
7 HERE_LDFLAGS = -static ${LDFLAGS}
8
9 SRC = vote.c util.c
10 OBJ = ${SRC:.c=.o}
11
12 all: ${NAME}
13
14 ${OBJ}:
15
16 ${NAME}: ${OBJ}
17 ${CC} -o $@ ${OBJ} ${HERE_LDFLAGS}
18
19 install: ${NAME}
20 mkdir -p ${PREFIX}/${NAME}
21 chmod 775 ${PREFIX}/${NAME}
22 chgrp www ${PREFIX}/${NAME}
23 cp -f ${NAME} ${PREFIX}/${NAME}/
24 chgrp www ${PREFIX}/${NAME}/${NAME}
25
26 uninstall:
27 rm -f ${PREFIX}/${NAME}/${NAME}
28 -rmdir ${PREFIX}/${NAME}
29
30 clean:
31 rm -f *.o
32 rm -f ${NAME}
33
34 .PHONY: all install uninstall clean |