.\"
.\" Copyright (c) 2007 Hypertriton, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 24, 2007
.Dt BUILD.PROJ.MK 5
.Os
.ds vT BSDBuild Reference
.ds oS BSDBuild 2.2
.Sh NAME
.Nm build.proj.mk
.Nd bsdbuild - compilation of IDE "project files"
.Sh SYNOPSIS
.Fd .include
.Sh DESCRIPTION
The
.Nm
module uses the
.Xr premake 1
utility to generate a set of archives containing project files for various
IDEs.
.Pp
The name of archive files follows the format
.Sq OS:ARCH:IDE:FLAVOR.ext ,
where
.Sq OS
is the name of the operating system,
.Sq ARCH
is the architecture name for the target,
.Sq IDE
is the name of the IDE
and
.Sq FLAVOR
is a comma-separated list of flavors, or variants.
.Pp
As of this writing, premake supports the following IDE targets:
.Pp
.Bl -tag -compact -width "sharpdev "
.It cb-gcc
Code::Blocks with gcc
.It vs6
Visual Studio 6
.It vs2002
Visual Studio 2002
.It vs2003
Visual Studio 2003
.It vs2005
Visual Studio 2005
.It gnu
GNU makefile (unneeded with BSDBuild)
.It monodev
MonoDevelop
.It sharpdev
ICSharpCode SharpDevelop
.El
.Pp
And the following OS targets:
.Pp
.Bl -tag -compact -width "windows "
.It bsd
OpenBSD, NetBSD and FreeBSD
.It linux
Linux
.It macosx
MacOS X
.It windows
Windows
.El
.Pp
.Sh TARGETS
.Bl -tag -width "proj "
.It Ar proj
If
.Dv PROJECT
is defined, generate the project files.
Otherwise, only generate
.Dv PREMAKEOUT
in the current directory.
.El
.Sh VARIABLES
.Bl -tag -width "PROJFILESEXTRA "
.It Ev PROJECT
Name of project.
If a project has multiple subdirectories, this should only be defined in
the top-level directory.
.It Ev PROJFILES
List of project files to generate.
Each entry has the format
.Sq OS:ARCH:IDE:FLAVOR:OPTIONS ,
where
.Sq OS
is the operating system,
.Sq ARCH
is the architecture,
.Sq IDE
is the name of the IDE,
.Sq FLAVOR
is a variant name (e.g., "nothreads")
and
.Sq OPTIONS
is a comma-separated list of configure options
(e.g., "--disable-threads").
.It Ev PROJDIR
Directory to hold generated project file archives.
.It Ev PROJFILESEXTRA
List of additional files to include in all project file archives.
.It Ev PROJINCLUDES
List of additional premake scripts to include everywhere.
.It Ev PREMAKE
Path to
.Xr premake 1
utility.
.It Ev ZIP
Path to
.Xr zip 1
utility.
.It Ev ZIPFLAGS
Flags to
.Xr zip 1 .
.It Ev MKPROJFILES
Path to
.Xr mkprojfiles 1
utility (which is part of BSDBuild).
.It Ev PREMAKEOUT
Filename of premake input generated by BSDBuild
(defaults to
.Pa premake.lua ) .
.It Ev PREMAKEFLAGS
Flags to premake utility.
.El
.Sh SEE ALSO
.Xr build.common.mk 5 ,
.Xr build.prog.mk 5 ,
.Xr build.lib.mk 5
.Sh HISTORY
.Nm
first appeared in BSDBuild 2.2
.Pp
BSDBuild is based on the 4.4BSD build system.