attached are updated Makefiles, one for the AT and one for IOT firmware. Basically they are the same, just added the extra libs and stuff to the variables in the IOT version.
I have made a few changes. First of all, the // is gone and replaced by a single /. The command-echo is now disabled and replaced by a short "what i'm doing now" output. A new variable, EXTRA_INCDIR, was added. Add any directories that contain include files which are not in the MODULES directories there. Additionally, the include search path is now extended to look for includes in "include" subdirectories of the MODULES. For example, with the "driver user" modules, it now also looks into "driver/include" and "user/include". This should help to organize the code tree a bit better.
Needless to say, what i gave in the README was just an example. No need reorg into only two directories. Just add whatever directories (and subdirectories thereof) you have in your local project structure and add those to the MODULES variable.
NOTE: Updated files are at http://www.esp8266.com/viewtopic.php?f=9&t=142&start=20#p772
Greetings,
Chris