forked from dnSpy/Mono.Debugger.Soft
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
56 lines (40 loc) · 2.24 KB
/
Makefile
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
thisdir = class/Mono.Debugger.Soft
include ../../build/rules.make
LIBRARY = Mono.Debugger.Soft.dll
LIBRARY_SNK = ../mono.snk
LIB_REFS = System Mono.Cecil System.Core
LIB_MCS_FLAGS = /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS -D:ENABLE_CECIL /publicsign
KEYFILE = $(LIBRARY_SNK)
ifndef MCS_MODE
DTEST_APP_FLAGS = -langversion:preview
endif
TEST_LIB_REFS = Mono.Cecil System System.Core
ifneq ($(filter monodroid monotouch monotouch_tv monotouch_watch wasm net_4_x,$(PROFILE)),)
test-local: build-dtest
endif
ifneq ($(filter monodroid monotouch monotouch_tv monotouch_watch wasm,$(PROFILE)),)
NO_INSTALL=1
NO_BUILD=1
NO_TEST=1
endif
test_output_dir=$(topdir)/class/lib/$(PROFILE)/tests
$(test_output_dir):
mkdir -p $@
build-dtest: $(test_output_dir)/dtest-app.exe $(test_output_dir)/dtest-excfilter.exe $(test_output_dir)/dtest-app-opt.exe
$(test_output_dir)/dtest-excfilter.exe: Test/dtest-excfilter.il | $(test_output_dir)
$(ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
$(test_output_dir)/dtest-app.exe: Test/dtest-app.cs $(TEST_HELPERS_SOURCES) | $(test_output_dir)
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Runtime.CompilerServices.Unsafe.dll -sourcelink:Test/sourcelink.json -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) $(DTEST_APP_FLAGS) -optimize- Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
$(test_output_dir)/dtest-app-opt.exe: Test/dtest-app-opt.cs $(TEST_HELPERS_SOURCES) | $(test_output_dir)
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -sourcelink:Test/sourcelink.json -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) $(DTEST_APP_FLAGS) -optimize+ Test/dtest-app-opt.cs $(TEST_HELPERS_SOURCES)
TEST_HELPERS_SOURCES = \
../test-helpers/NetworkHelpers.cs \
Test/TypeLoadClass.cs
EXTRA_DISTFILES = \
Test/dtest-app.cs \
Test/dtest.cs \
Test/dtest-excfilter.il \
Test/sourcelink.json \
$(TEST_HELPERS_SOURCES)
CLEAN_FILES = $(addprefix $(test_output_dir)/, dtest-app.exe dtest-app.exe.mdb dtest-app.pdb dtest-excfilter.exe dtest-excfilter.exe.mdb dtest-excfilter.pdb)
include ../../build/library.make