with output dir and better Makefile