tools

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

commit b53cec676f9ad7b944e4d692cb6a11670e56bbdd
parent 492999f408b8edd748c714526838c8eed7430069
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Sun,  3 Jan 2021 10:53:06 +0100

all: simplify build system

Diffstat:
Mbtl/btl.ninja | 6++----
Mlmerge/lmerge.ninja | 10++++------
Dtemplate.ninja | 33---------------------------------
3 files changed, 6 insertions(+), 43 deletions(-)

diff --git a/btl/btl.ninja b/btl/btl.ninja @@ -1,11 +1,9 @@ PROJECT = btl -BUILD = build -ROOT = ./ CXXFLAGS = $$CXXFLAGS -fcolor-diagnostics -DFILE_PTR=FILE* -SRC = ./$ROOT/$PROJECT/src -DST = ./$ROOT/$BUILD/$PROJECT/src +SRC = ./$PROJECT/src +DST = ./build/$PROJECT/src build $DST/optparser.cpp.o: cxx $SRC/optparser.cpp build $DST/string.cpp.o: cxx $SRC/string.cpp diff --git a/lmerge/lmerge.ninja b/lmerge/lmerge.ninja @@ -1,14 +1,12 @@ PROJECT = lmerge -BUILD = build -ROOT = ./ CXXFLAGS = $$CXXFLAGS -fcolor-diagnostics -fno-rtti -fno-exceptions -SRC = ./$ROOT/$PROJECT/src -DST = ./$ROOT/$BUILD/$PROJECT/src +SRC = ./$PROJECT/src +DST = ./build/$PROJECT/src -BTL_LIB = ./$ROOT/$BUILD/btl/ -BTL_INC = ./$ROOT/btl/src/ +BTL_LIB = ./build/btl/ +BTL_INC = ./btl/src/ CXXFLAGS = $CXXFLAGS -I$BTL_INC -DFILE_PTR=FILE* build $DST/lmerge.cpp.o: cxx $SRC/lmerge.cpp diff --git a/template.ninja b/template.ninja @@ -1,33 +0,0 @@ -## 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