Permalink
Browse files

Add build scripts

  • Loading branch information...
mjsabby committed Feb 23, 2015
1 parent 7ae9c88 commit 7bb14483ae15289204d8e83eb04a914e53e28049
Showing with 39 additions and 0 deletions.
  1. +13 −0 build.bat
  2. +12 −0 build.sh
  3. +14 −0 build.sh.bat
View
@@ -0,0 +1,13 @@
@echo off
if [%1]==[] (
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 /B
)
if [%2]==[] (
echo **ERROR**: Clang Include Directory is required. This is the directory which contains "clang" and "clang-c" as subdirectories
EXIT /B
)
csc /out:ClangSharpPInvokeGenerator.exe ClangSharpPInvokeGenerator\*.cs
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
csc /target:library /out:ClangSharp.dll Generated.cs Extensions.cs
View
@@ -0,0 +1,12 @@
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/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
View
@@ -0,0 +1,14 @@
@echo off
if [%1]==[] (
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 /B
)
if [%2]==[] (
echo **ERROR**: Clang Include Directory is required. This is the directory which contains "clang" and "clang-c" as subdirectories
EXIT /B
)
mcs /out:ClangSharpPInvokeGenerator.exe ClangSharpPInvokeGenerator\ClangSharp.Extensions.cs ClangSharpPInvokeGenerator\EnumVisitor.cs ClangSharpPInvokeGenerator\Extensions.cs ClangSharpPInvokeGenerator\ForwardDeclarationVisitor.cs ClangSharpPInvokeGenerator\FunctionVisitor.cs ClangSharpPInvokeGenerator\Generated.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

0 comments on commit 7bb1448

Please sign in to comment.