plan9port/src/libthread/mkfile

55 lines
1.1 KiB
Text
Raw Normal View History

2004-12-25 21:57:50 +00:00
<$PLAN9/src/mkhdr
2004-12-27 16:52:26 +00:00
SYSOFILES=`{sh ./sysofiles.sh}
2004-12-25 21:57:50 +00:00
LIB=libthread.a
OFILES=\
2004-12-27 16:52:26 +00:00
$SYSOFILES\
2004-12-25 21:57:50 +00:00
channel.$O\
2004-12-28 01:35:38 +00:00
daemonize.$O\
2004-12-25 21:57:50 +00:00
exec.$O\
ioproc.$O\
iorw.$O\
ref.$O\
thread.$O\
2006-02-12 16:48:50 +00:00
wait.$O\
2004-12-25 21:57:50 +00:00
<$PLAN9/src/mksyslib
HFILES=thread.h threadimpl.h
2005-05-01 18:38:12 +00:00
OpenBSD.$O FreeBSD.$O: BSD.c
NetBSD.$O: Linux.c
2004-12-25 21:57:50 +00:00
tprimes: tprimes.$O
9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
tspawn: tspawn.$O
9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
tspawnloop: tspawnloop.$O
9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
%.$O: %.c
2005-05-01 18:38:12 +00:00
$CC $CFLAGS -I. $stem.c
2005-05-01 22:28:11 +00:00
# cannot use generic .S rule because it conflicts
# with generic .s rule in mkcommon on case-insensitive
# systems like Mac OS X.
2005-07-21 18:29:04 +00:00
OpenBSD-%-asm.$O: OpenBSD-%-asm.S
$CC $CFLAGS OpenBSD-$stem-asm.S
2004-12-25 21:57:50 +00:00
2006-02-14 06:52:41 +00:00
Linux-sparc64-context.$O: Linux-sparc64-context.S
$CC $CFLAGS Linux-sparc64-context.S
2004-12-25 21:57:50 +00:00
test:V: tprimes tspawn
primes 1 10007 >p1.txt
$PLAN9/bin/time ./tprimes 10000 >tp1.txt
cmp p1.txt tp1.txt
primes 1 1009 >p2.txt
$PLAN9/bin/time ./tprimes 1000 >tp2.txt
cmp p2.txt tp2.txt
echo tspawn should take 3 seconds, not 6
$PLAN9/bin/time ./tspawn sleep 3 >/dev/null
CLEANFILES=p1.txt p2.txt tp1.txt tp2.txt
2006-02-14 06:52:41 +00:00