tools

various tools
git clone git://deadbeef.fr/tools.git
Log | Files | Refs | README | LICENSE

commit 006c1a83ce2a58bbf9bd2cb05e79204d88950edd
parent a78e1df4c573b8ccab6d90edb5319ed285a8ed70
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Fri, 14 Aug 2020 05:06:56 +0200

add a template for ninja builds

Diffstat:
Atemplate.ninja | 33+++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)

diff --git a/template.ninja b/template.ninja @@ -0,0 +1,33 @@ +## Ninja minimum version: 1.8 (debian buster default) +## Some variabes must be defined, otherwise there is no +## guarantee on how and where things will be built. +## +## This template will use following directories: +## subproject's "code" root: +## $GIT_ROOT/$PROJECT/src +## +## files will be generated in: +## $GIT_ROOT/$BUILD/$PROJECT/src +## +## needed variables are: +## project's name: PROJECT +## +## The conf.ninja defines the C/C++/LD rules: cxx, cc, ld, +## and the variables: $SRC, $DST +## the build declarations *MUST* be put after the include +## (obviously). +## +## Library dependencies should be loaded through the +## "subninja" command, to avoid polluting namespace. +## +## +## Template: +## PROJECT = foobar +## BUILD = build +## ROOT = ./ +## CXXFLAGS = $$CXXFLAGS -fcolor-diagnostics -DFILE_PTR=FILE* +## include conf.ninja +## subninja btl.ninja +## build $DST/bla.cpp.o: cxx $SRC/bla.cpp +## build $DST/bla: ld $DST/bla.cpp.o btl.a +## build $DST/bla.a: ar $DST/bla.cpp.o