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