Skip to content

Commit

Permalink
Add Yara compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
fdechelle committed May 30, 2017
1 parent ce98740 commit 0856c82
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yara/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yara/
x64/
22 changes: 22 additions & 0 deletions yara/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Prerequisites
==============

Get YARA 3.6.0 sources:

git clone https://github.com/VirusTotal/yara.git -b v3.6.0


YARA needs VisualStudio >= 2015 to compile.

To build from Visual Studio:

* open yara/windows/vs2015/yara.sln
* build solution

To build from command line and create distribution:

makedist.bat

Note: as makedist.bat calls msbuild, this batch file must be launched
from "Developer Command Prompt for VSxxxx" (command prompt for Visual
Studio that has the right build environment)
27 changes: 27 additions & 0 deletions yara/makedist.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

call :buildAndCopy x64 Debug
call :buildAndCopy x64 Release
goto :eof

:buildAndCopy
setlocal
set platform=%~1
set configuration=%~2

msbuild yara\windows\vs2015\libyara\libyara.vcxproj /t:rebuild /p:Platform=x64 /p:Configuration=Debug

REM if not exist %platform%\%configuration%\include mkdir %platform%\%configuration%\include
REM xcopy jansson\build\include\*.h %platform%\%configuration%\include /D /I /Y

REM if not exist %platform%\%configuration%\lib mkdir %platform%\%configuration%\lib
REM if %configuration% == Debug (
REM copy jansson\build\lib\%configuration%\jansson_d.lib %platform%\%configuration%\lib\jansson.lib
REM ) else (
REM copy jansson\build\lib\%configuration%\jansson.lib %platform%\%configuration%\lib\jansson.lib
REM )
endlocal
goto :eof




0 comments on commit 0856c82

Please sign in to comment.