Fixed Makefiles to properly compile the code.