78 lines
1.9 KiB
Plaintext
78 lines
1.9 KiB
Plaintext
### GRBC BUILT-IN NINJA GENERATOR ###
|
|
|
|
## Default variables ##
|
|
|
|
builddir = build
|
|
|
|
## build_rule_compile_cc ##
|
|
|
|
cc_path = /usr/lib64/ccache/gcc
|
|
rule cc
|
|
command = $cc_path -MMD -MT $out -MF $out.d $p_cflags -c $in -o $out
|
|
description = Compiling C object $in
|
|
depfile = $out.d
|
|
deps = gcc
|
|
|
|
## build_rule_compile_cxx ##
|
|
|
|
cxx_path = /usr/lib64/ccache/g++
|
|
rule cxx
|
|
command = $cxx_path -MMD -MT $out -MF $out.d $p_cflags -c $in -o $out
|
|
description = Compiling C++ object $in
|
|
depfile = $out.d
|
|
deps = gcc
|
|
|
|
## build_rule_link_cc ##
|
|
|
|
rule link_cc
|
|
command = $cc_path $p_cflags -o $out $in $p_linker_flags
|
|
description = Linking C executables $out
|
|
|
|
## build_rule_link_cxx ##
|
|
|
|
rule link_cxx
|
|
command = $cxx_path $p_cflags -o $out $in $p_linker_flags
|
|
description = Linking C++ executables $out
|
|
|
|
## Compile: src/main.cc ##
|
|
|
|
build $builddir/src/main.o: cxx src/main.cc
|
|
p_cflags = -Iinclude -Ivendor/sol2/include
|
|
|
|
## Compile: src/file.cc ##
|
|
|
|
build $builddir/src/file.o: cxx src/file.cc
|
|
p_cflags = -Iinclude -Ivendor/sol2/include
|
|
|
|
## Compile: src/ninja.cc ##
|
|
|
|
build $builddir/src/ninja.o: cxx src/ninja.cc
|
|
p_cflags = -Iinclude -Ivendor/sol2/include
|
|
|
|
## Compile: src/platform.cc ##
|
|
|
|
build $builddir/src/platform.o: cxx src/platform.cc
|
|
p_cflags = -Iinclude -Ivendor/sol2/include
|
|
|
|
## Compile: src/target_exe.cc ##
|
|
|
|
build $builddir/src/target_exe.o: cxx src/target_exe.cc
|
|
p_cflags = -Iinclude -Ivendor/sol2/include
|
|
|
|
## Compile: src/utils.cc ##
|
|
|
|
build $builddir/src/utils.o: cxx src/utils.cc
|
|
p_cflags = -Iinclude -Ivendor/sol2/include
|
|
|
|
## Compile: src/generator.cc ##
|
|
|
|
build $builddir/src/generator.o: cxx src/generator.cc
|
|
p_cflags = -Iinclude -Ivendor/sol2/include
|
|
|
|
## Link: grbc ##
|
|
|
|
build grbc: link_cxx $builddir/src/main.o $builddir/src/file.o $builddir/src/ninja.o $builddir/src/platform.o $builddir/src/target_exe.o $builddir/src/utils.o $builddir/src/generator.o
|
|
p_linker_flags = -llua -lm -ldl
|
|
p_cflags =
|
|
|