help:
	@echo
	@echo "make bench       Run cobench"
	@echo "make bencht      Run cobench with tracing"
	@echo "make bench100    Run cobench with n=100"
	@echo "make bench500    Run cobench with n=500 (the default)"
	@echo "make bench10000  Run cobench with n=10000"
	@echo "make sim         Run cosim"
	@echo "make simt        Run cosim with tracing"
	@echo "make sim100      Run cosim with n=100"
	@echo "make sim500      Run cosim with n=500 (the default)"
	@echo "make sim10000    Run cosim with n=10000"
	@echo "make test        Run cotest"
	@echo "make clean       Delete compiled files"
	@echo "make help        Display the help infomation"
	@echo

bench:	bench500

bench100:	cobench
	time ./cobench -k 10000 -n 100

bench500:	cobench
	time ./cobench -k 10000 -n 500

bench10000:	cobench
	time ./cobench -k 10000 -n 10000

bencht:	cobench
	time ./cobench -k 3 -n 2 -t

test:	cotest
	time ./cotest

sim:	sim500

sim100:	cosim
	time ./cosim -s 1000000 -p 1000 -n 100

sim500:	cosim
	time ./cosim -s 1000000 -p 1000 -n 500

sim10000:	cosim
	time ./cosim -s 1000000 -p 1000 -n 10000

simt:	cosim
	./cosim -n 5 -s 1000 -p 500 -t

test:	cotest
	./cotest

cobench:	cobench.c cortn.c
	gcc -O3 -o cobench cobench.c

cosim:	cosim.c cortn.c
	gcc -O3 -o cosim cosim.c

cotest:	cotest.c cortn.c
	gcc -O3 -o cotest cotest.c

clean:
	rm -f cobench cosim cotest *~
