more restructuring of code to have only one makefile