Update Makefile

moved library linking at the end