The rebar build tool can generate self-contained erlang applications using reltool under the hood. There is a good tutorial here, so there is no need for one here. However, for best mileage in the real world, the deps folder needs to be added to the lib_dirs parameter (in reltool.config) in addition to the apps folder.
{lib_dirs, ["../apps", "../deps"]}.
After executing rebar generate, you can verify that all your dependencies plus your applications were successfully included by checking the rel/myapp/lib directory.