forked from sociomantic-tsunami/ocean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.mak
66 lines (51 loc) · 2 KB
/
Build.mak
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
# This will make D2 unittests fail if stomping prevention is triggered
export ASSERT_ON_STOMPING_PREVENTION=1
override DFLAGS += -w -version=GLIBC
# Makd auto-detects if Ocean's test runner should be used based on submodules,
# but we -or course- don't have Ocean as a submodule, so we set it explicitly.
TEST_RUNNER_MODULE := ocean.core.UnitTestRunner
# Do we want coverage report?
ifeq ($(AFTER_SCRIPT),1)
COVFLAG:=-cov
endif
ifeq ($(DVER),1)
override DFLAGS := $(filter-out -di,$(DFLAGS)) -v2 -v2=-static-arr-params -v2=-volatile
else
# Open source Makd uses dmd by default
DC ?= dmd
override DFLAGS += -de
endif
# Remove coverage files
clean += .*.lst
# Remove deprecated modules from testing:
TEST_FILTER_OUT += \
$C/src/ocean/io/Stdout_tango.d \
$C/src/ocean/io/FilePath_tango.d \
$C/src/ocean/core/Traits_tango.d \
$C/src/ocean/core/Exception_tango.d \
$C/src/ocean/io/device/SerialPort.d \
$C/src/ocean/io/device/ProgressFile.d \
$C/src/ocean/math/BigInt.d \
$C/src/ocean/util/log/LayoutChainsaw.d \
$C/src/ocean/util/log/Log.d \
$C/src/ocean/text/convert/Memory.d \
$C/src/ocean/stdc/stringz.d \
$C/src/ocean/io/stream/Snoop.d \
$C/src/ocean/core/_util/console.d \
$C/src/ocean/core/_util/string.d \
$(shell find $C/src/ocean/text/locale -type f)
# integration test which is disabled by default because it depends on Collectd
TEST_FILTER_OUT += \
$C/test/collectd/main.d
$O/test-filesystemevent: override LDFLAGS += -lrt
$O/test-selectlistener: override LDFLAGS += -lebtree
$O/test-unixlistener: override LDFLAGS += -lebtree
$O/test-loggerstats: override LDFLAGS += -lebtree
$O/test-signalext: override LDFLAGS += -lebtree
$O/test-sysstats: override LDFLAGS += -lebtree
$O/test-httpserver: override LDFLAGS += -lebtree -lglib-2.0
# Link unittests to all used libraries
$O/%unittests: override LDFLAGS += -lglib-2.0 -lpcre -lxml2 -lxslt -lebtree \
-lreadline -lhistory -llzo2 -lbz2 -lz -ldl -lgcrypt -lgpg-error -lrt
# Enable coverage generation from unittests
$O/%unittests: override DFLAGS += $(COVFLAG)