contrib: massive Makefile rework