This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
forked from statsite/statsite
-
Notifications
You must be signed in to change notification settings - Fork 2
/
SConstruct
35 lines (28 loc) · 2.05 KB
/
SConstruct
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
import platform
envmurmur = Environment(CPATH = ['deps/murmurhash/'], CFLAGS="-std=c99 -O3")
murmur = envmurmur.Library('murmur', Glob("deps/murmurhash/*.c"))
envinih = Environment(CPATH = ['deps/inih/'], CFLAGS="-O3")
inih = envinih.Library('inih', Glob("deps/inih/*.c"))
env_statsite_with_err = Environment(CCFLAGS = '-g -std=c99 -D_GNU_SOURCE -Wall -Werror -Wstrict-aliasing=0 -O3 -pthread -Ideps/inih/ -Ideps/libev/ -Isrc/')
env_statsite_without_err = Environment(CCFLAGS = '-g -std=c99 -D_GNU_SOURCE -O3 -pthread -Ideps/inih/ -Ideps/libev/ -Isrc/')
objs = env_statsite_with_err.Object('src/hashmap', 'src/hashmap.c') + \
env_statsite_with_err.Object('src/heap', 'src/heap.c') + \
env_statsite_with_err.Object('src/radix', 'src/radix.c') + \
env_statsite_with_err.Object('src/hll_constants', 'src/hll_constants.c') + \
env_statsite_with_err.Object('src/hll', 'src/hll.c') + \
env_statsite_with_err.Object('src/set', 'src/set.c') + \
env_statsite_with_err.Object('src/cm_quantile', 'src/cm_quantile.c') + \
env_statsite_with_err.Object('src/timer', 'src/timer.c') + \
env_statsite_with_err.Object('src/counter', 'src/counter.c') + \
env_statsite_with_err.Object('src/metrics', 'src/metrics.c') + \
env_statsite_with_err.Object('src/streaming', 'src/streaming.c') + \
env_statsite_with_err.Object('src/config', 'src/config.c') + \
env_statsite_without_err.Object('src/networking', 'src/networking.c') + \
env_statsite_without_err.Object('src/conn_handler', 'src/conn_handler.c')
statsite_libs = ["m", "pthread", murmur, inih]
if platform.system() == 'Linux':
statsite_libs.append("rt")
statsite = env_statsite_with_err.Program('statsite', objs + ["src/statsite.c"], LIBS=statsite_libs)
statsite_test = env_statsite_without_err.Program('test_runner', objs + Glob("tests/runner.c"), LIBS=statsite_libs + ["check"])
# By default, only compile statsite
Default(statsite)