Create dependencies in Makefile.
Add dolegend option to asy files.