added OUTDIR to place main
added BUILDDIR