default: out.times.txt
	cat $<

out.times.txt: harm.exe harm.py harm Makefile
	cat /dev/null > $@
	echo "=== pyhon ===" >> $@
	time --format "running time: %U seconds" --append --output $@ \
		python3 harm.py >> $@
	echo "=== csharp mono ===" >> $@
	time --format "running time: %U seconds" --append --output $@ \
		mono harm.exe >> $@
	echo "=== c ===" >> $@
	time --format "running time: %U seconds" --append --output $@ \
		./harm >> $@

harm.exe: harm.cs
	mcs harm.cs

harm: harm.c
	cc -Ofast harm.c -o harm

clean:
	$(RM) harm harm.exe out.times.txt
