main: *.sml *.mlb lib
	mpl -default-type int64 -default-type word64 main.mlb

test: *.sml *.mlb lib
	mpl -default-type int64 -default-type word64 test.mlb

README.pdf: README.md
	pandoc README.md -V colorlinks=true -V linkcolor=blue -o README.pdf

hw4.tgz: lib README.pdf
	tar czf hw4.tgz -C .. hw4/lib hw4/lib-local hw4/cpp hw4/DedupSort.sml hw4/main.mlb hw4/main.sml hw4/README.pdf hw4/ReferenceImplementations.sml hw4/Scramble.sml hw4/test.sml hw4/test.mlb hw4/Makefile hw4/sml.pkg

lib:
	smlpkg sync

clean:
	rm -f main cpp/dedup_sort README.pdf