CFLAGS

CFLAGS

CFLAGS and CXXFLAGS are either the name of environment variables or of Makefile variables that can be set to specify additional switches to be passed to a compiler in the process of building computer software.

These variables are usually set inside a Makefile and are then appended to the command line when the compiler is invoked. If they are not specified in the Makefile, then they will be read from the environment, if present. Tools like autoconf's ./configure script will usually pick them up from the environment and write them into the generated Makefiles.

CFLAGS allows to add switches for the C compiler, while CXXFLAGS is meant to be used when invoking a C++ compiler. Similarly, a variable CPPFLAGS exists with switches to be passed to the C preprocessor.

These variables are most commonly used to specify optimization or debugging switches to a compiler, as for example -g, -O2 or (GCC-specific) -march=athlon.

ee also

*Compiler optimization

External links

* [http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html GNU optimisation page]
* [http://gentoo-wiki.com/CFLAGS Gentoo Wiki CFLAG guide]
* [http://gentoo-wiki.com/Safe_Cflags Gentoo Wiki guide to safe CFLAGS]
* [http://linuxreviews.org/howtos/compiling/ Linux Review page on optimized gcc compiling]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • CFLAGS — et CXXFLAGS sont les noms de variables d environnement ou de variables du Makefile qui peuvent être utilisées pour paramétrer la compilation d un logiciel. Ces variables sont habituellement positionnées dans un Makefile et sont ajoutées quand le… …   Wikipédia en Français

  • CFLAGS — и CXXFLAGS являются или именами переменных среды или переменными Makefile, которые устанавливаются для указания дополнительных параметров, передаваемых компилятору в процессе создания программного обеспечения. Эти переменные обычно указываются… …   Википедия

  • Make — Cet article a pour sujet le logiciel intitulé make. Pour une définition du mot « make », voir l’article make du Wiktionnaire. make est un logiciel traditionnel d UNIX. C est un « moteur de production » : il sert à appeler …   Wikipédia en Français

  • Makefile — make Cet article a pour sujet le logiciel intitulé make. Pour une définition du mot « make », voir l’article make du Wiktionnaire. make est un logiciel traditionnel d UNIX. C est un « moteur de production » : il sert à… …   Wikipédia en Français

  • make — Cet article a pour sujet le logiciel intitulé make. Pour une définition du mot « make », voir l’article make du Wiktionnaire. make est un logiciel traditionnel d UNIX. C est un « moteur de production » : il sert à appeler …   Wikipédia en Français

  • Make — Saltar a navegación, búsqueda make es una herramienta de generación o automatización de código, muy usada en los sistemas operativos tipo Unix/Linux. Por defecto lee las instrucciones para generar el programa u otra acción del fichero makefile.… …   Wikipedia Español

  • make — es una herramienta de generación o automatización de código, muy usada en los sistemas operativos tipo Unix/Linux. Por defecto lee las instrucciones para generar el programa u otra acción del fichero makefile. Las instrucciones escritas en este… …   Wikipedia Español

  • Make (software) — make Original author(s) Stuart Feldman Initial release 1977 Type build automation tool In software development, Make is a utility that automatically builds executable programs and libraries from source code by rea …   Wikipedia

  • Liste von Hallo-Welt-Programmen/Sonstige — Dies ist eine Liste von Hallo Welt Programmen für grafische Benutzeroberflächen, Web Technologien, exotische Programmiersprachen und Textauszeichnungssprachen. Weitere Beispiele für gebräuchliche Programmiersprachen sind unter Liste von Hallo… …   Deutsch Wikipedia

  • $PATH — Variable d environnement En informatique, les variables d’environnement sont des variables dynamiques utilisées par les différents processus d’un système d’exploitation (Windows, Unix, etc.). Elles servent à communiquer des informations entre… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”