GNU Make Manual Implicit Variables

From Minor Miracle Software
Jump to: navigation, search

GNU Make Manual Implicit Variables[1]

For a current list use the command

$make --print-data-base

Common Implicit Variables for make.

  1. AR Archive-maintaining program; default ‘ar’.
  2. AS Program for compiling assembly files; default ‘as’.
  3. CC Program for compiling C programs; default ‘cc’.
  4. CXX Program for compiling C++ programs; default ‘g++’.
  5. CPP Program for running the C preprocessor, with results to standard output; default ‘$(CC) -E’.
  6. FC Program for compiling or preprocessing Fortran and Ratfor programs; default ‘f77’.
  7. M2C Program to use to compile Modula-2 source code; default ‘m2c’.
  8. PC Program for compiling Pascal programs; default ‘pc’.
  9. CO Program for extracting a file from RCS; default ‘co’.
  10. GET Program for extracting a file from SCCS; default ‘get’.
  11. LEX Program to use to turn Lex grammars into source code; default ‘lex’.
  12. YACC Program to use to turn Yacc grammars into source code; default ‘yacc’.
  13. LINT Program to use to run lint on source code; default ‘lint’.
  14. MAKEINFO Program to convert a Texinfo source file into an Info file; default ‘makeinfo’.
  15. TEX Program to make TeX DVI files from TeX source; default ‘tex’.
  16. TEXI2DVI Program to make TeX DVI files from Texinfo source; default ‘texi2dvi’.
  17. WEAVE Program to translate Web into TeX; default ‘weave’.
  18. CWEAVE Program to translate C Web into TeX; default ‘cweave’.
  19. TANGLE Program to translate Web into Pascal; default ‘tangle’.
  20. CTANGLE Program to translate C Web into C; default ‘ctangle’.
  21. RM Command to remove a file; default ‘rm -f’.

Here is a table of variables whose values are additional arguments for the programs above. The default values for all of these is the empty string, unless otherwise noted.

  1. ARFLAGS Flags to give the archive-maintaining program; default ‘rv’.
  2. ASFLAGS Extra flags to give to the assembler (when explicitly invoked on a ‘.s’ or ‘.S’ file).
  3. CFLAGS Extra flags to give to the C compiler.
  4. CXXFLAGS Extra flags to give to the C++ compiler.
  5. COFLAGS Extra flags to give to the RCS co program.
  6. CPPFLAGS Extra flags to give to the C preprocessor and programs that use it (the C and Fortran compilers).
  7. FFLAGS Extra flags to give to the Fortran compiler.
  8. GFLAGS Extra flags to give to the SCCS get program.
  9. LDFLAGS Extra flags to give to compilers when they are supposed to invoke the linker, ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable instead.
  10. LDLIBS Library flags or names given to compilers when they are supposed to invoke the linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS variable.
  11. LFLAGS Extra flags to give to Lex.
  12. YFLAGS Extra flags to give to Yacc.
  13. PFLAGS Extra flags to give to the Pascal compiler.
  14. RFLAGS Extra flags to give to the Fortran compiler for Ratfor programs.
  15. LINTFLAGS Extra flags to give to lint.

Internal Links

Parent Article: GNU Make Manual