Let's begin from the last question: 'CONFIG' is not an enviroment variable but is one of the most important qmake variable. If you take a look to your project (.pro) file, you'll find a reference to this variable.
Take a look here http://doc.qt.nokia.com/4.7/qmake-va...reference.html
For example, with CONFIG, you can set if a library must build statically or dinamically or just tell if you want to see gcc warning messages.
Let's go on: when you launch the qmake -set QMAKEFEATURES path/qwt.prf, you tell to qmake that a new feature is available and all its information is stored inside the prf file specified. Adding Qwt as feature to your project allow you to enable Qwt just setting 'CONFIG += qwt' to your .pro, without care about paths; you can also add to your project Qwt specifying the qwt path into INCLUDEPATH, LIBS... it's the "dirty way"...!
If I scared you, maybe it's time to have a "quick" look to qmake world and all its features...!
http://doc.qt.nokia.com/4.7/qmake-running.html
Bookmarks