buildsys: introduce BUILDDIR variable