set BUILD_HSAILASM=1
set BUILD_LIBBRIGDWARF=1
set ELFTOOLCHAIN_PATH=C:\ws\sc\drivers\hsa\contrib\elftoolchain
set LIBELF_PATH=%ELFTOOLCHAIN_PATH%\libelf
set LIBDWARF_PATH=C:\ws\sc\drivers\sc\HSAIL\hsail-tools\libdwarf
set RE2C_EXECUTABLE=C:\ws\dk\win\re2c\re2c.exe

cd ..

md build\win32
cd build\win32
set BUILD_SUBDIR=build\wNow\B_dbg
cmake -G "Visual Studio 12 2013"       -DBUILD_HSAILASM=%BUILD_HSAILASM% -DBUILD_LIBBRIGDWARF=%BUILD_LIBBRIGDWARF% "-DLIBELF_INCLUDE_DIRS=%LIBELF_PATH%;%LIBELF_PATH%/../common;%LIBELF_PATH%/../common/win32" -DLIBDWARF_INCLUDE_DIRS=%LIBDWARF_PATH%\src -DLIBELF_LIBRARIES=%LIBELF_PATH%\%BUILD_SUBDIR%\libelf.lib -DLIBDWARF_LIBRARIES=%LIBDWARF_PATH%\%BUILD_SUBDIR%\libdwarf.lib -DRE2C_EXECUTABLE=%RE2C_EXECUTABLE% -DCMAKE_INSTALL_PREFIX=dist %* ..\..
cd ..\..

md build\win64
cd build\win64
set BUILD_SUBDIR=build\wNow64a\B_dbg
cmake -G "Visual Studio 12 2013 Win64" -DBUILD_HSAILASM=%BUILD_HSAILASM% -DBUILD_LIBBRIGDWARF=%BUILD_LIBBRIGDWARF% "-DLIBELF_INCLUDE_DIRS=%LIBELF_PATH%;%LIBELF_PATH%/../common;%LIBELF_PATH%/../common/win32" -DLIBDWARF_INCLUDE_DIRS=%LIBDWARF_PATH%\src -DLIBELF_LIBRARIES=%LIBELF_PATH%\%BUILD_SUBDIR%\libelf.lib -DLIBDWARF_LIBRARIES=%LIBDWARF_PATH%\%BUILD_SUBDIR%\libdwarf.lib -DRE2C_EXECUTABLE=%RE2C_EXECUTABLE% -DCMAKE_INSTALL_PREFIX=dist %* ..\..
cd ..\..
