grbc build config
This commit is contained in:
parent
4ec4a0ecf5
commit
c3da063493
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
bin
|
||||
bin
|
||||
build/
|
||||
|
|
7
HConfig
Normal file
7
HConfig
Normal file
|
@ -0,0 +1,7 @@
|
|||
grbc_want_version("1.0")
|
||||
|
||||
grbc_ext("GRBC_EXT_profiles")
|
||||
|
||||
require("init")
|
||||
|
||||
grbc_build("ninja")
|
55
build.ninja
Normal file
55
build.ninja
Normal file
|
@ -0,0 +1,55 @@
|
|||
### GENERATED BY THE GRBC BUILT-IN NINJA GENERATOR ###
|
||||
### GENERATED ON: 1728873691 ###
|
||||
|
||||
## 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 target $out
|
||||
|
||||
## build_rule_link_cxx ##
|
||||
|
||||
rule link_cxx
|
||||
command = $cxx_path $p_cflags -o $out $in $p_linker_flags
|
||||
description = Linking C++ target $out
|
||||
|
||||
## build_rule_archive_library ##
|
||||
|
||||
rule archive
|
||||
command = rm -f $out; ar crs $out $in
|
||||
description = Creating static library $out
|
||||
|
||||
## Compile: src/dlopen.c ##
|
||||
|
||||
build $builddir/src/dlopen.o: cc src/dlopen.c
|
||||
p_cflags = -Isrc -g -O1
|
||||
|
||||
## Link: libhotwire.a ##
|
||||
|
||||
build $builddir/libhotwire.a: archive $builddir/src/dlopen.o
|
||||
|
||||
build all: phony $builddir/libhotwire.a
|
||||
|
||||
default all
|
26
init.lua
Normal file
26
init.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
local hotwire_lib = grbc_library(LibraryConfig.new({
|
||||
name = "libhotwire",
|
||||
language_type = LanguageType.C,
|
||||
|
||||
files = {
|
||||
grbc_file("src/dlopen.c")
|
||||
},
|
||||
|
||||
lib_type = LibraryType.Static,
|
||||
requirements = {},
|
||||
compile_flags = {},
|
||||
linker_flags = {},
|
||||
include_dirs = {
|
||||
grbc_file("src")
|
||||
},
|
||||
|
||||
package_config = PackageConfig.new({
|
||||
name = "libhotwire",
|
||||
libraries = {},
|
||||
include_dirs = {
|
||||
grbc_file("src")
|
||||
},
|
||||
compile_flags = {},
|
||||
linker_flags = {}
|
||||
})
|
||||
}))
|
Loading…
Reference in a new issue