patch Makefile and use erlang.mk