rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 1 | <$PLAN9/src/mkhdr |
| 2 | |
rsc | 4dbefdd | 2004-12-27 16:52:26 +0000 | [diff] [blame] | 3 | SYSOFILES=`{sh ./sysofiles.sh} |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 4 | LIB=libthread.a |
| 5 | OFILES=\ |
rsc | 4dbefdd | 2004-12-27 16:52:26 +0000 | [diff] [blame] | 6 | $SYSOFILES\ |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 7 | channel.$O\ |
rsc | 2c87dda | 2004-12-28 01:35:38 +0000 | [diff] [blame] | 8 | daemonize.$O\ |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 9 | exec.$O\ |
| 10 | ioproc.$O\ |
| 11 | iorw.$O\ |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 12 | ref.$O\ |
| 13 | thread.$O\ |
rsc | 4940b55 | 2006-02-12 16:48:50 +0000 | [diff] [blame] | 14 | wait.$O\ |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 15 | |
| 16 | <$PLAN9/src/mksyslib |
| 17 | |
| 18 | HFILES=thread.h threadimpl.h |
rsc | cea1000 | 2005-05-01 18:38:12 +0000 | [diff] [blame] | 19 | OpenBSD.$O FreeBSD.$O: BSD.c |
| 20 | NetBSD.$O: Linux.c |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 21 | |
Russ Cox | e7ae611 | 2007-10-30 13:33:12 -0400 | [diff] [blame] | 22 | tprimes: test/tprimes.$O |
| 23 | 9l -o $target test/$target.$O |
| 24 | tspawn: test/tspawn.$O |
| 25 | 9l -o $target test/$target.$O |
| 26 | tspawnloop: test/tspawnloop.$O |
| 27 | 9l -o $target test/$target.$O |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 28 | |
| 29 | %.$O: %.c |
Russ Cox | e7ae611 | 2007-10-30 13:33:12 -0400 | [diff] [blame] | 30 | $CC -o $target $CFLAGS -I. $stem.c |
rsc | 5ba33c0 | 2005-03-28 15:58:14 +0000 | [diff] [blame] | 31 | |
rsc | 910ca53 | 2005-05-01 22:28:11 +0000 | [diff] [blame] | 32 | # cannot use generic .S rule because it conflicts |
| 33 | # with generic .s rule in mkcommon on case-insensitive |
| 34 | # systems like Mac OS X. |
| 35 | |
rsc | fe8c925 | 2005-07-21 18:29:04 +0000 | [diff] [blame] | 36 | OpenBSD-%-asm.$O: OpenBSD-%-asm.S |
| 37 | $CC $CFLAGS OpenBSD-$stem-asm.S |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 38 | |
rsc | 76a78f4 | 2006-02-14 06:52:41 +0000 | [diff] [blame] | 39 | Linux-sparc64-context.$O: Linux-sparc64-context.S |
rsc | 07b075d | 2006-02-16 06:02:46 +0000 | [diff] [blame] | 40 | $CC -m64 -mcpu=v9 $CFLAGS Linux-sparc64-context.S |
rsc | 76a78f4 | 2006-02-14 06:52:41 +0000 | [diff] [blame] | 41 | |
rsc | c33c141 | 2006-02-16 06:22:03 +0000 | [diff] [blame] | 42 | Linux-sparc64-swapcontext.$O: Linux-sparc64-swapcontext.c |
| 43 | $CC -m64 -mcpu=v9 $CFLAGS Linux-sparc64-swapcontext.c |
| 44 | |
rsc | 619085f | 2004-12-25 21:57:50 +0000 | [diff] [blame] | 45 | test:V: tprimes tspawn |
| 46 | primes 1 10007 >p1.txt |
| 47 | $PLAN9/bin/time ./tprimes 10000 >tp1.txt |
| 48 | cmp p1.txt tp1.txt |
| 49 | primes 1 1009 >p2.txt |
| 50 | $PLAN9/bin/time ./tprimes 1000 >tp2.txt |
| 51 | cmp p2.txt tp2.txt |
| 52 | echo tspawn should take 3 seconds, not 6 |
| 53 | $PLAN9/bin/time ./tspawn sleep 3 >/dev/null |
| 54 | |
| 55 | CLEANFILES=p1.txt p2.txt tp1.txt tp2.txt |
| 56 | |
rsc | 76a78f4 | 2006-02-14 06:52:41 +0000 | [diff] [blame] | 57 | |