♥ 學習筆記Learning 程式語言 Coding

[程式] QT中的qmake常用指令

QMake Commands

QMake by default does ‘check’ build. There are many other operations QMake can do, the following is a summary of the commands and variables it understands.

Commonly used commands

In particualr it removes object files created during compilation for this library this forces all objects in the current library to be recompiled.

check
Build binaries and libraries with consistancy checking (Default). this is the recomended target for development work.

debug
Build binaries and code with debug information, but link with the check version of RAVL. This should be quicker than debugging all of RAVL.

debugfull
Build binaries with debug information, link executables with the all available debug information. NB. The executables may be very large.

opt
Optimised build.

shared
Build optimised shared libraries/executables.

prof
Output optimised code with profiling info suitable for prof.

gprof
Output optimised code with profiling info suitable for gprof.

purify
Build all executables in the CURRENT directory with purify. purify executables are prefixed with ‘pure_’. Use only on solaris machines.

src
Check-out all source, and put headers in the right place.

clean
Remove all temporary files. (NB. Use VAR=… to set variant.) (See below for details)

optclean
as clean with VAR=opt

dbclean
as clean with VAR=debug

chkclean
as clean with VAR=check

cleanlib
Like clean, but removes library as well.

cleandep
Remove all dependency files. Clean dependancy information. This forces the make system to recompute the library and file dependancies.

distclean
Clean and remove all executables and libraries for current variant.

doc
Make automatic documentation.

chead
Check headers compile cleanly.

lib_info
RCS- Tells you which libraries are needed/used to create an executable.

help
Print this help on the QMake system.

defs
List of public def’s files.

test
Compile and run test executables.

retest
Rerun the final stage of testing.

notes
Print help on more obscure/unstable parts of the QMake system.

Variables

PROCS=(no)
Number of processors to use.

VAR=(check|debug|opt|shared)
check (default), debug, opt

QMAKE_INFO=1
Print command lines during make.

USERCFLAGS=…
Pass extra options to the compiler.

Obsolete

listco
RCS- List all files that are checked out in source tree.

listoff
List all directories that are turned off.

listfix
List all lines in source than contain ‘FIXME’.

ci
RCS- Check in directory tree. See ‘notes’ for details.

docentry
Make semantic documentation

Examples

  % qm qopt

Make optimised version of code, with frozen dependencies.

  % qm debug PROCS=1 QMAKE_INFO=1

Build a debug version of file and executables, use only one processor and show the commands that are executed.

出處:http://ravl.sourceforge.net/share/doc/RAVL/Auto/Basic/Tree/Ravl.QMake.Commands.html

About the author

蕾咪

蕾咪,來自台東,卻不定期旅居歐洲的工程師女孩,身兼作家、部落客、創業家等多重身份。畢業於台大電子所,曾在義大利商與美商擔任研發工程師;走訪世界後,發現對台灣有段割捨不了的愛,讓我們一起努力成為想要的自己吧!:) 合作邀稿請聯繫:[email protected]

3 Comments

Leave a Comment