fix linker bug
simplify makefiles