fix makefile to include libraries automatically