adapt Makefile and prepare.sh to directory structure