aboutsummaryrefslogtreecommitdiff
path: root/make.bat
blob: 195ef3887f4d87abfc0f3109785d6c94c46fd575 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@echo off
if not "x%WDKDIR%" == "x" goto SELECT_LIB
echo The WDKDIR environment variable is not set
echo Set this variable to your WDK directory (without ending backslash)
echo Example: set WDKDIR C:\WinDDK\6001
pause
goto:eof

:SELECT_LIB
set PROJECT_DIR=%~dp0
set LIBRARY_NAME=StormLibWDK

:PREPARE_SOURCES
echo Preparing sources ...
copy .\src\wdk\sources-cpp.cpp . >nul
copy .\src\wdk\sources-wdk-*   . >nul
echo.

:BUILD_LIB_32
echo Building %LIBRARY_NAME%.lib 32-bit (free) ...
set DDKBUILDENV=
call %WDKDIR%\bin\setenv.bat %WDKDIR%\ fre wxp
cd %PROJECT_DIR%
build.exe -czgw
echo.

:COPY_LIB_32
copy /Y .\objfre_wxp_x86\i386\%LIBRARY_NAME%.lib ..\aaa\lib32\%LIBRARY_NAME%.lib >nul
del buildfre_wxp_x86.log
echo.

:BUILD_LIB_64
echo Building %LIBRARY_NAME%.lib 64-bit (free) ...
set DDKBUILDENV=
call %WDKDIR%\bin\setenv.bat %WDKDIR%\ fre x64 WLH
cd %PROJECT_DIR%
build.exe -czgw
echo.

:COPY_LIB_64
copy /Y .\objfre_wlh_amd64\amd64\%LIBRARY_NAME%.lib ..\aaa\lib64\%LIBRARY_NAME%.lib >nul
del buildfre_wlh_amd64.log
echo.

:COPY_HEADER
copy /Y .\src\StormLib.h  ..\aaa\inc >nul
copy /Y .\src\StormPort.h ..\aaa\inc >nul

rem Clean temporary files ...
if exist sources-cpp.cpp del sources-cpp.cpp
if exist sources-wdk-* del sources-wdk-*
if exist build.bat del build.bat