diff options
author | Nao Pross <naopross@thearcway.org> | 2019-01-22 15:25:28 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2019-01-22 15:25:28 +0100 |
commit | 6d4630cbdc7feb3ac3cece46aa3556fd5b592eac (patch) | |
tree | 1f6820dc3b23dc11b6e3eff7436263b698a2f6c6 /ninja | |
parent | Fix file name in header of mmvec.hpp (diff) | |
download | libmm-6d4630cbdc7feb3ac3cece46aa3556fd5b592eac.tar.gz libmm-6d4630cbdc7feb3ac3cece46aa3556fd5b592eac.zip |
Add ninja build files to create a shared and static library
Diffstat (limited to 'ninja')
-rw-r--r-- | ninja/rules.ninja | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ninja/rules.ninja b/ninja/rules.ninja new file mode 100644 index 0000000..04b625c --- /dev/null +++ b/ninja/rules.ninja @@ -0,0 +1,27 @@ +includes = -I engine/include +cflags = -Wall -Werror -pedantic -fPIC -std=c++17 $includes + +libs = +lflags = $libs + +flags = -fdiagnostics-color + +rule mkdir + command = mkdir -p $out + description = creating directory $out + +rule cpp + command = g++ $flags $cflags -c $in -o $out $lflags + description = compiling $in + +rule link + command = g++ $flags $cflags -o $out $in $lflags + description = linking $out + +rule link-shared + command = g++ $flags $cflags -shared -o $out $in $lflags + description = linking shared object $out + +rule link-static + command = ar rvs $out $in + description = creating archive $out |