xref: /freebsd/tools/regression/poll/Makefile (revision d94d07d58141dcff48f01c6b3e5a31de9d7a7938)
1# This makefile has been uglified for portability.
2# Nothing yet works with gmake for the path to the sources.
3.PATH: ..
4
5PROG=	pipepoll pipeselect sockpoll
6CFLAGS+= -Werror -Wall
7
8all: ${PROG}
9pipepoll: pipepoll.c
10pipeselect: pipeselect.c
11sockpoll: sockpoll.c
12
13pipepoll pipeselect sockpoll:
14	${CC} ${CFLAGS} ${LDFLAGS} -o $@ $@.c
15
16test: all
17	-for prog in ${PROG}; do \
18		./$${prog} > $${prog}.out.new; \
19		diff -u1 $${prog}.out $${prog}.out.new; \
20	done
21
22clean:
23	for prog in ${PROG}; do \
24		rm -f $${prog} $${prog}.out.new; \
25	done
26
27rename:
28	for prog in ${PROG}; do \
29		mv $${prog}.out.new $${prog}.out; \
30	done
31
32veryclean: clean
33	for prog in ${PROG}; do \
34		rm -f $${prog}.out; \
35	done
36