\chapter The 10 minute guide to using qmake

\section1 Creating a project file

In order to use \e qmake to generate a makefile for your application you need to have a project (.pro) file.
A basic project file contains information about your application such as which files are needed to compile it 
and basic configuration settings for the application.

A simple project file will look something like the following.

\code
	SOURCES = hello.cpp
	HEADERS = hello.h
	CONFIG += qt warn_on release
	TARGET = hello
\endcode

We'll go through this line by line briefly for now, and later on in the manual we will go into more detail about
the available options.

\code
	SOURCES = hello.cpp
\endcode

This line specifies the source files for your application, in this case we only have one \e hello.cpp.  If you have
more than one in your project then you can either put it on the same line leaving a space between the source files

\code
	SOURCES = hello.cpp main.cpp
\endcode

Or you can put it on a separate line, if you do this then you need to put a \e \ after the last source file so it 
looks like

\code
	SOURCES = hello.cpp \
		    main.cpp
\endcode

Now we'll move onto the HEADERS line
\code 
	HEADERS = hello.h
\endcode

This line specifies the header files for your application, this is used in the same way as the SOURCES line.

The next line is the CONFIG line
\code 
	CONFIG += qt warn_on release
\endcode

The config line specifies the basic configuration of the application.  For now, ignore the \e += part of the line,
just ensure that you use this when you create your own project files.  

The \e qt part of the CONFIG line tells \e qmake that the application is built using Qt.  This means that \e qmake will 
link against the Qt libraries when linking and add in the neccesary include paths for compiling.

The \e warn_on part of the CONFIG line tells \e qmake that it should set the compiler flags for outputting warnings.

The \e release part of the CONFIG line tells \e qmake that the application is to be built as a release application. 
If you wish to build your application as a debug application then specify \e debug here instead of release.

The last line in the project file is the TARGET line

\code
	TARGET = hello
\endcode

The target line simply specifies what the name of the target should be for the application.  You shouldn't put an 
extension here because \e qmake will do this for you.

When you create a project file, just save it as a \e .pro file, for example, we might save the project file in our 
example as \e hello.pro

\section1 Generating a makefile 

When you have created your project file it is very easy to generate a makefile, all you need to do is go to where you have
created your project file and type:

\code
	qmake -o Makefile hello.pro 
\endcode

And this will create a makefile for your application.  If you want to create to a Visual Studio project file for your application
then just put:

\code
	qmake -t vcapp -o hello.dsp hello.pro
\endcode
