-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
70 lines (53 loc) · 1.41 KB
/
wscript
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
#!/usr/bin/env python
APPNAME = 'dt'
MAJOR = 0
MINOR = 1
PATCH = 0
RELEASE = 'beta'
VERSION = '%d.%d.%d-%s' % (MAJOR, MINOR, PATCH, RELEASE)
APPPREFIX = APPNAME + '_'
top = '.'
out = 'build'
sources = 'src/**/*.c'
includes = 'include/**/**.h'
doxyfile = "Doxyfile"
def options(ctx):
# Waf chore
ctx.load("compiler_c")
# Options
ctx.add_option(
'-C', '--c-compiler'
, dest = 'c_compiler'
, default = ''
, action = 'store'
, help = "Chooses the exact compiler to use in the build process."
)
def configure(ctx):
# Load compiler
if ctx.options.c_compiler:
ctx.load(ctx.options.c_compiler)
else:
ctx.load("compiler_c")
def build(ctx):
ctx.stlib(
source = ctx.path.ant_glob(sources)
, target = APPNAME
, defines = [APPPREFIX + 'STATIC', APPPREFIX + 'BUILDING']
, includes = ['include']
#, cflags = ['-E']
)
ctx.shlib(
source = ctx.path.ant_glob(sources)
, target = APPNAME
, includes = ['include']
, defines = [APPPREFIX + 'BUILDING']
)
def docs(ctx):
from subprocess import call
node = ctx.path.make_node("build/docs")
try: node.mkdir()
except: pass
call(["doxygen", doxyfile])
def setup_site(ctx):
from subprocess import call
print("Todo...")