Manual writing Makefile is a painful thing, a little careless will be wrong, but qmake can let you out of misery
Qmake can generate makefile based on the . Pro file that you provide.
I want some more . Pro File Yes! , but he's a lot simpler than makefile, and you can learn it in a minute.
simple. Pro file
SOURCES + = Hello. CPP + = hello.hconfig+ = cnosole warn_on Debug
Only configure these three items to generate makefile
SOURCES
Writes out the location of the source file, supports relative paths, supports wildcard characters
SOURCES =.. /SRC/*. cpp
Sources uses = overwrites previously assigned values, so it is recommended to use + =
HEADERS
Write the location of the header file, using the same way as sources
HEADERS + =. /SRC/*. h
CONFIG
The configuration options for program compilation are defined here, for example:
Console represents the Build console program
WARN_ON represents open warning
Debug is compiled on behalf of debug mode and can also be used with release
Generate makefile
Generate Makefile Using Qmake