forked from dotnet/ClangSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·35 lines (32 loc) · 1.29 KB
/
build.sh
File metadata and controls
executable file
·35 lines (32 loc) · 1.29 KB
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
if [ -z "$1" ]; then
echo **ERROR**: Clang Shared Library Location is required. A good value for this parameter is 'libclang' which will translate to 'libclang.dll' or 'libclang.so' in deployment relative directory
exit 1
fi
if [ -z "$2" ]; then
echo **ERROR**: Clang Include Directory is required. This is the directory which contains "clang" and "clang-c" as subdirectories
exit 1
fi
mcs /out:ClangSharpPInvokeGenerator.exe \
ClangSharpPInvokeGenerator/ClangSharp.Extensions.cs \
ClangSharpPInvokeGenerator/EnumVisitor.cs \
ClangSharpPInvokeGenerator/Extensions.cs \
ClangSharpPInvokeGenerator/ForwardDeclarationVisitor.cs \
ClangSharpPInvokeGenerator/FunctionVisitor.cs \
ClangSharpPInvokeGenerator/Generated.cs \
ClangSharpPInvokeGenerator/Generated.Custom.cs \
ClangSharpPInvokeGenerator/ICXCursorVisitor.cs \
ClangSharpPInvokeGenerator/Program.cs \
ClangSharpPInvokeGenerator/StructVisitor.cs \
ClangSharpPInvokeGenerator/TypeDefVisitor.cs
mono ClangSharpPInvokeGenerator.exe \
--m clang \
--p clang_ \
--namespace ClangSharp \
--output Generated.cs \
--libraryPath $1 \
--include $2 \
--file $2/clang-c/Index.h \
--file $2/clang-c/CXString.h \
--file $2/clang-c/Documentation.h \
--file $2/clang-c/CXErrorCode.h
mcs /target:library /out:ClangSharp.dll Generated.cs Extensions.cs