use gnu conventions for target dir names
add version.h generation support