rem @echo off

set ObjDir=LibObj
set OutDir=Libs
md %OutDir%
md %ObjDir%

call "%VS80COMNTOOLS%\vsvars32.bat

rem Compile resource for NtEventLogAppender

"%VS80COMNTOOLS%\Bin\mc.exe"  -h %ObjDir% -r %ObjDir% NTEventLogCategories.mc
"%VS80COMNTOOLS%\Bin\RC.exe" -r -fo %ObjDir%\NTEventLogCategories.res %ObjDir%\NTEventLogCategories.rc
"%VCINSTALLDIR%\Bin\link.exe" /MACHINE:IX86 -dll -noentry -out:%OutDir%\NTEventLogAppender.dll %ObjDir%\NTEventLogCategories.res

rem Compile DLL for log4cpp debug

"%VS80COMNTOOLS%\..\IDE\devenv" msvc6.sln /build Debug /project log4cppDll\log4cppDLL.vcproj
copy log4cppDLL\Debug\log4cpp.dll %OutDir%\log4cppD.dll
copy log4cppDLL\Debug\log4cpp.lib %OutDir%\liblog4cpp-Deb-Dyn.lib

rem Compile DLL for log4cpp release

"%VS80COMNTOOLS%\..\IDE\devenv" msvc6.sln /build Release /project log4cppDll\log4cppDLL.vcproj
copy log4cppDLL\Debug\log4cpp.dll %OutDir%\log4cpp.dll
copy log4cppDLL\Debug\log4cpp.lib %OutDir%\liblog4cpp-Rel-Dyn.lib

rem Compile libs for log4cpp release

"%VS80COMNTOOLS%\..\IDE\devenv" msvc6.sln /build Release /project log4cpp\log4cpp.vcproj
copy log4cpp\Release\log4cpp.lib %OutDir%\log4cpp-Rel-Dyn.lib

rem Compile libs for log4cpp debug

"%VS80COMNTOOLS%\..\IDE\devenv" msvc6.sln /build Debug /project log4cpp\log4cpp.vcproj
copy log4cpp\Debug\log4cpp.lib %OutDir%\log4cpp-Deb-Dyn.lib

rem Compile libs for log4cpp releasesta

"%VS80COMNTOOLS%\..\IDE\devenv" msvc6.sln /build ReleaseSta /project log4cpp\log4cpp.vcproj
copy log4cpp\ReleaseSta\log4cpp.lib %OutDir%\log4cpp-Rel-Sta.lib

rem Compile libs for log4cpp debugsta

"%VS80COMNTOOLS%\..\IDE\devenv" msvc6.sln /build DebugSta /project log4cpp\log4cpp.vcproj
copy log4cpp\DebugSta\log4cpp.lib %OutDir%\log4cpp-Deb-Sta.lib
