add compile_nif and update Makefile