Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
BUILD.PROG.MK(5)	      File Formats Manual	      BUILD.PROG.MK(5)

NAME
       build.prog.mk --	bsdbuild - compilation of executables

SYNOPSIS
       .include	<bsd.prog.mk>

DESCRIPTION
       The  build.prog.mk module is used to compile an executable program from
       a set of	source	files.	 The  module  provides	built-in  support  for
       sources in the following	languages:
          C (*.c)
          C++ (*.cc or	*.cpp)
          Objective C (*.m)
          Assembler (*.asm)
          Lex (*.l)
          Yacc	(*.y)

TARGETS
       ${PROG}		Compile/link the ${PROG} executable from the specified
			source files.

       ${GMONOUT}	Compile/link a profiled	version	of ${PROG}.

       clean-prog	Clean up object	and executable files.

       cleandir-prog	Clean up for packaging.

       install-prog	Install	 program  to the target	installation directory
			(see csoft.common.mk(5)).

       deinstall-prog	Uninstall program from the installation	directory.

VARIABLES
       PROG		Filename  of  target  executable.    Platform-specific
			transforms may be applied to the name.

       PROG_TYPE	Type  of application.  Set to `CLI' for	a command-line
			utility, `GUI' for a graphical interface and  `DAEMON'
			for  a server program.	Defaults to `CLI'.  The	inter-
			pretation of this setting  is  platform-specific.   On
			the  Windows  platform,	this instructs the compiler to
			select the appropriate PE header subsystem.

       BINDIR		Target installation directory for executables (usually
			set by configure).

       PROG_INSTALL	If set to `Yes', the install target will  install  the
			program,  otherwise  it	 will be a no-op.  Defaults to
			`Yes'.

       PROG_GUID	A Global Unique	Identifier  (GUID)  for	 the  program.
			Exact interpretation is	platform-specific.

       GMONOUT		Output filename	for profiled version of	the program.

       CC		Compiler for C,	C++ and	Objective C sources.  Defaults
			to `cc'.

       CFLAGS		Compiler flags for C sources.  Defaults	to `-O2	-g'.

       CXXFLAGS		Compiler flags for C++ sources.	 Defaults to `'.

       OBJCFLAGS	Compiler  flags	 for Objective C sources.  Defaults to
			`${CFLAGS}'.

       CPPFLAGS		Compiler preprocessor flags, for sources in  all  lan-
			guages featuring a C preprocessor.

       ASM		Compiler for assembler sources.	 Defaults to `nasm'.

       ASMFLAGS		Compiler   flags   for	assembler.   Defaults  to  `-g
			-w-orphan-labels'.

       LEX		Path to	the lex(1) lexical analyzer generator.

       YACC		Path to	the yacc(1) parser generator.

       LFLAGS		Options	for lex(1), defaults to	`'.

       YFLAGS		Options	for yacc(1), defaults to `-d'.

       LIBL		Libraries to use for Lex lexers.  Defaults to `-ll'.

       WINDRES		(Specific  to  the  win32  platform)   Path   to   the
			windres(1)  utility,  which generates windows resource
			files.

       WINRES		(Specific to the win32 platform) Resource file to  use
			with windres(1).

       DATAFILES	List  of  data	files to install into ${DATADIR}.  The
			files must have	been generated from the	build  process
			(i.e.,	if  using  a separate build with --srcdir, the
			specified files	must exist in the build	directory).

       DATAFILES_SRC	Files to install into ${DATADIR}.   This  variable  is
			handled	similarly to DATAFILES,	except that the	speci-
			fied files must	exist in the source directory.

       CONFDIR		System-wide configuration files	will be	installed into
			this   directory.   It	is  usually  set  relative  to
			`${SYSCONFDIR}',	      for	       example
			`${SYSCONFDIR}/MyApplication'.

       CONF		List   of   configuration   files   to	 install  into
			${CONFDIR}. Note that  the  install  target  will  not
			override existing configuration	files, instead it will
			output	a "The following configuration files have been
			preserved" message.

       CONF_OVERWRITE	Overwrite any existing configuration file on installa-
			tion.  Default is "No".

SEE ALSO
       build.common.mk(5), build.lib.mk(5)

HISTORY
       build.prog.mk first appeared in BSDBuild	1.0.

       BSDBuild	is based on the	4.4BSD build system.

FreeBSD	ports 15.0		 July 18, 2007		      BUILD.PROG.MK(5)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=build.prog.mk&sektion=5&manpath=FreeBSD+Ports+15.0>

home | help