Update erlang makefile and port Makefile changes from zdsms-erl