1# $OpenBSD: Makefile,v 1.1 2003/02/04 21:21:00 marc Exp $
2#
3
4PROG=		stdfiles
5
6PROG2=		stdfiles2
7OBJS2=		stdfiles.o
8
9CLEANFILES+=	${PROG2} threads no-threads
10
11REGRESS_TARGETS=diff
12
13# run program after linking with pthreads
14#
15threads: ${PROG}
16	./${PROG} > threads
17
18# build the same program, but not linked with pthreads
19#
20${PROG2}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD}
21	${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS}
22
23# run the non-pthread version
24#
25no-threads: ${PROG2}
26	./${PROG2} > no-threads
27
28# compare the thread output to the non-thread output, should be the same
29#
30diff: threads no-threads
31	diff -u threads no-threads
32
33.PHONY: threads no-threads diff
34
35.include <bsd.regress.mk>
36