File tree Expand file tree Collapse file tree 4 files changed +43
-10
lines changed
tests/invocation-overhead Expand file tree Collapse file tree 4 files changed +43
-10
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ ifeq ($(OS),Linux)
99NATIVE_EXT = .so
1010endif
1111
12- RUNTIME := $(shell if [ -f "`which mono64`" ] ; then echo mono64 ; else echo mono; fi) --debug=casts
13-
1412XA_CONFIGURATION = XAIntegrationDebug
1513
1614GENDARME_URL = https://cloud.github.com/downloads/spouliot/gendarme/gendarme-2.10-bin.zip
5856 -rm -Rf bin/$(CONFIGURATION ) bin/Build$(CONFIGURATION ) bin/Test$(CONFIGURATION ) bin/XAIntegration$(CONFIGURATION )
5957 -rm src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config
6058
61- include build-tools/scripts/jdk.mk
6259include build-tools/scripts/mono.mk
60+ include build-tools/scripts/jdk.mk
6361
6462$(PACKAGES ) $(NUNIT_CONSOLE ) :
6563 nuget restore
Original file line number Diff line number Diff line change 33#
44# Inputs:
55#
6- # $(OS): ` uname` value of the host operating system
6+ # $(OS): Optional; ** uname**(1) value of the host operating system
77# $(CONFIGURATION): Build configuration name, e.g. Debug or Release
8+ # $(RUNTIME): `mono` executable for the host operating system
89#
910# Outputs:
1011#
1920# $(JI_JVM_PATH):
2021# Location of the Java native library that contains e.g. JNI_CreateJavaVM().
2122
22-
23+ OS ?= $( shell uname)
2324
2425ifeq ($(OS ) ,Darwin)
2526
Original file line number Diff line number Diff line change 1+ #
2+ # Mono Path Probing
3+ #
4+ # Inputs:
5+ #
6+ # $(OS): Optional; **uname**(1) value of the host operating system
7+ # $(CONFIGURATION): Build configuration name, e.g. Debug or Release
8+ #
9+ # Outputs:
10+ #
11+ # bin/Build$(CONFIGURATION)/MonoInfo.props:
12+ # MSBuild property file which contains:
13+ # * `$(MonoFrameworkPath)`: `$(JI_MONO_FRAMEWORK_PATH)` value.
14+ # * `$(MonoLibs)`: `$(JI_MONO_LIBS)` value.
15+ # * `@(MonoIncludePath)`: `$(JI_MONO_INCLUDE_PATHS)` values.
16+ # $(JI_MONO_FRAMEWORK_PATH):
17+ # Path to the `libmonosgen-2.0.1.dylib` file to link against.
18+ # $(JI_MONO_INCLUDE_PATHS):
19+ # One or more space separated paths containing Mono headers to pass as
20+ # -Ipath values to the compiler.
21+ # It DOES NOT contain the -I itself; use $(JI_MONO_INCLUDE_PATHS:%=-I%) for that.
22+ # $(JI_MONO_LIBS)
23+ # C compiler linker arguments to link against `$(JI_MONO_FRAMEWORK_PATH)`.
24+ # $(RUNTIME):
25+ # The **mono**(1) program to use to execute managed code.
26+
27+ OS ?= $(shell uname)
28+ RUNTIME := $(shell if [ -f "`which mono64`" ] ; then echo mono64 ; else echo mono; fi) --debug=casts
129
230ifeq ($(OS ) ,Darwin)
331JI_MONO_FRAMEWORK_PATH = /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.1.dylib
Original file line number Diff line number Diff line change 1- JNIENV_GEN = ../../bin/ Debug/jnienv-gen.exe
2- LOCAL_JDK_HEADERS = ../../LocalJDK/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
1+ CONFIGURATION = Debug
2+ JNIENV_GEN = ../../bin/BuildDebug/jnienv-gen.exe
33
44all : test-overheads.exe libjava-interop.dylib
55
66clean :
77 -rm test-overheads.exe test-overheads.exe.mdb
88 -rm -Rf libJavaInterop.dylib*
99
10+ include ../../build-tools/scripts/mono.mk
11+ include ../../build-tools/scripts/jdk.mk
12+
13+ $(JNIENV_GEN ) :
14+ (cd ../../build-tools/jnienv-gen ; xbuild /p:Configuration=$( CONFIGURATION) )
15+
1016HANDLE_FEATURES = \
1117 -d:FEATURE_JNIENVIRONMENT_JI_INTPTRS \
1218 -d:FEATURE_JNIENVIRONMENT_JI_PINVOKES \
@@ -17,10 +23,10 @@ test-overheads.exe: test-overheads.cs jni.cs
1723 mcs -out:$@ -unsafe $(HANDLE_FEATURES ) $^
1824
1925jni.c jni.cs : $(JNIENV_GEN )
20- mono $< jni.cs jni.c
26+ $( RUNTIME ) $< jni.cs jni.c
2127
2228libjava-interop.dylib : jni.c
23- gcc -g -shared -o $@ $< -m32 -DJI_DLL_EXPORT -fvisibility=hidden -I $( LOCAL_JDK_HEADERS )
29+ gcc -g -shared -o $@ $< -m64 -DJI_DLL_EXPORT -fvisibility=hidden $( JI_JDK_INCLUDE_PATHS:%=-I% )
2430
2531run :
26- mono --debug test-overheads.exe
32+ $( RUNTIME ) test-overheads.exe
You can’t perform that action at this time.
0 commit comments