added command-line options to set target directories
rebuild after sources changed