makefile fixes, built successfully but it crashes with a bus error

I fixed the "library not loaded: /usr/lib" error. The executable just crashes with a bus error related to flockfile.