If you want to use the URL m.domainname.com, then it is best to place the index file in that folder, i.e. root/m in order to fire up by default. Other files/assets are linked, hence it matters not where they are located as long as the link is correct.
Incidentally, m.domainname.com is the same asdomainname.com/m