-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
55 lines (43 loc) · 1.12 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
#!/usr/bin/env python
APPNAME = 'csv'
MAJORVERSION = 0
MINORVERSION = 1
PATCHVERSION = 0
RELEASENAME = 'beta'
VERSION = '%d.%d.%d-%s' % (MAJORVERSION, MINORVERSION, PATCHVERSION, RELEASENAME)
APPPREFIX = APPNAME + '_'
top = '.'
out = 'build'
sources = 'src/**.c'
includes = 'include/**.h'
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']
)