We can build our first C file.

This commit is contained in:
David Given
2016-08-07 21:56:53 +02:00
parent b50dc4214a
commit 0d77cb8279
16 changed files with 258 additions and 38 deletions

View File

@@ -0,0 +1,7 @@
clibrary {
name = "lib",
srcs = { "./*.c" },
hdrs = { "./assert.h" },
}

View File

@@ -0,0 +1,11 @@
clibrary {
name = "lib",
srcs = { "./*.c" },
deps = {
"h+emheaders",
"modules+headers",
"modules/src/em_code+em_code_ek_h",
"util/data+em_data",
}
}

View File

@@ -1,6 +1,22 @@
clibrary {
name = "lib",
srcs = { "./*.c" },
srcs = {
"./flt_ar2flt.c",
"./flt_div.c",
"./flt_flt2ar.c",
"./flt_modf.c",
"./flt_str2fl.c",
"./flt_cmp.c",
"./flt_add.c",
"./b64_add.c",
"./flt_mul.c",
"./flt_nrm.c",
"./b64_sft.c",
"./flt_umin.c",
"./flt_chk.c",
"./split.c",
"./ucmp.c",
},
hdrs = { "./flt_arith.h" },
deps = {
"modules+headers"

View File

@@ -25,34 +25,39 @@ normalrule {
}
}
clibrary {
name = "lib_ev",
vars = {
["+cflags"] = {
"-DPRIVATE=static",
"-DEXPORT=",
"-DNDEBUG",
"-DCHECKING"
local function variant(name, cflags)
clibrary {
name = name,
vars = {
["+cflags"] = {
"-DPRIVATE=static",
"-DEXPORT=",
"-DNDEBUG",
"-DCHECKING",
unpack(cflags)
},
},
},
srcs = {
"./EM_vars.c",
"./read_em.c",
"./mkcalls.c",
},
hdrs = {
"./em_comp.h",
},
deps = {
"+c_mnem_h",
"+c_mnem_narg_h",
"h+emheaders",
"modules+headers",
"modules/src/alloc+lib",
"modules/src/em_code+em_code_ek_h",
"modules/src/system+lib",
"util/data+em_data",
srcs = {
"./EM_vars.c",
"./read_em.c",
"./mkcalls.c",
},
hdrs = {
"./em_comp.h",
},
deps = {
"+c_mnem_h",
"+c_mnem_narg_h",
"h+emheaders",
"modules+headers",
"modules/src/alloc+lib",
"modules/src/em_code+em_code_ek_h",
"modules/src/system+lib",
"util/data+em_data",
}
}
}
end
variant("lib_ev", {})
variant("lib_kv", { "-DCOMPACT" })