not using the name of the direcotory as a rule name
regenerating filenames if necessary
added targets 'clean' and 'rebuild', 'filenames' as variable
fixing removing trailing silences
update makefile