forked from willemt/ticketd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
84 lines (66 loc) · 1.68 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -*- mode: python -*-
# vi: set ft=python :
import sys
import os
def options(opt):
opt.load('compiler_c')
def configure(conf):
conf.load('compiler_c')
conf.load('clib')
def build(bld):
bld.load('clib')
includes = []
cflags = """
-Werror=int-to-pointer-cast
-g
-O0
-Werror=unused-variable
-Werror=return-type
-Werror=uninitialized
-Werror=pointer-to-int-cast
""".split()
lib = ['uv', 'h2o', 'ssl', 'crypto']
libpath = [os.getcwd()]
if sys.platform == 'darwin':
cflags.extend("""
-fcolor-diagnostics
-fdiagnostics-color
""".split())
# Added due to El Capitan changes
includes.append('/usr/local/opt/openssl/include')
libpath.append('/usr/local/opt/openssl/lib')
elif sys.platform.startswith('linux'):
cflags.extend("""
-DLINUX
""".split())
lib.append('pthread')
lib.append('rt')
clibs = """
arraytools
container_of
h2o_helpers
lmdb
lmdb_helpers
raft
tpl
uv_helpers
uv_multiplex
""".split()
h2o_includes = """
./deps/h2o/include
./deps/picohttpparser
./deps/klib
""".split()
uv_includes = """
./deps/libuv/include
""".split()
bld.program(
source="""
src/main.c
""".split() + bld.clib_c_files(clibs),
includes=['./include'] + includes + bld.clib_h_paths(clibs) + h2o_includes + uv_includes,
target='ticketd',
stlibpath=['.'],
libpath=libpath,
lib=lib,
cflags=cflags)