-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.py
executable file
·75 lines (60 loc) · 2.13 KB
/
make.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env python3
#coding: utf-8
import licant
import licant.install
import os
licant.execute("genos.g.py")
licant.include("zillot")
licant.include("igris")
def target(suffix): return "libgenos.{}".format(suffix)
modules = [
"genos",
"genos.host_stub",
"zillot.include"
]
CCFLAGS = '-fPIC -Wall -pedantic-errors -Wreturn-type -Wno-gnu-zero-variadic-macro-arguments'
CXXFLAGS = CCFLAGS
licant.cxx_library("shared",
target="libgenos.so",
mdepends=modules,
cxx_flags=CXXFLAGS,
cc_flags=CCFLAGS,
shared=True,
cxxstd="gnu++17",
ccstd="gnu11",
optimize="-O3"
)
licant.cxx_library("static",
target="libgenos.a",
mdepends=modules,
cxx_flags=CXXFLAGS,
cc_flags=CCFLAGS,
cxxstd="gnu++17",
ccstd="gnu11",
optimize="-O3",
shared=False
)
licant.cxx_application("runtests",
sources=["tests/*.cpp"],
include_paths=[".", "tests"],
mdepends=[
"genos",
"zillot",
"zillot.mock",
"igris.include",
"igris.utilxx",
("igris.systime", "jiffies"),
],
libs=["nos", "igris"],
cxx_flags="-flto -ffunction-sections -fexceptions -fdata-sections -Wl,--gc-sections -g -fno-rtti",
cc_flags="-flto -ffunction-sections -fdata-sections -Wl,--gc-sections -g",
ld_flags="-flto -ffunction-sections -fdata-sections -Wl,--gc-sections -g -fno-rtti",
)
licant.fileset("all", ["runtests", "libgenos.so", "libgenos.a"])
licant.install.install_library(
tgt="install",
uninstall="uninstall",
libtgt="libgenos.so",
hroot="genos",
headers="genos")
licant.ex("all")