tools

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

template.ninja (973B)


      1 ## Ninja minimum version: 1.8 (debian buster default)
      2 ## Some variabes must be defined, otherwise there is no
      3 ## guarantee on how and where things will be built.
      4 ##
      5 ## This template will use following directories:
      6 ## subproject's "code" root:
      7 ## $GIT_ROOT/$PROJECT/src
      8 ##
      9 ## files will be generated in:
     10 ## $GIT_ROOT/$BUILD/$PROJECT/src
     11 ##
     12 ## needed variables are:
     13 ## project's name: PROJECT
     14 ##
     15 ## The conf.ninja defines the C/C++/LD rules: cxx, cc, ld,
     16 ## and the variables: $SRC, $DST
     17 ## the build declarations *MUST* be put after the include
     18 ## (obviously).
     19 ##
     20 ## Library dependencies should be loaded through the
     21 ## "subninja" command, to avoid polluting namespace.
     22 ##
     23 ##
     24 ## Template:
     25 ## PROJECT = foobar
     26 ## BUILD   = build
     27 ## ROOT    = ./
     28 ## CXXFLAGS = $$CXXFLAGS -fcolor-diagnostics -DFILE_PTR=FILE*
     29 ## include conf.ninja
     30 ## subninja btl.ninja
     31 ## build $DST/bla.cpp.o: cxx $SRC/bla.cpp
     32 ## build $DST/bla: ld $DST/bla.cpp.o btl.a
     33 ## build $DST/bla.a: ar $DST/bla.cpp.o