Files
EPANET/build/WinSDK/win_make.bat
Elad Salomons 19f04fb8b3 Add WIN build for linked EXE
Now the WIN build script supports two options: one is a standalone EXE
were the entire code base is compiled into one EXE file and the second
is an EXE which is linked to the DLL
2015-12-09 21:55:16 +02:00

25 lines
1.1 KiB
Batchfile

rem : set path to Windows SDK
SET SDK_PATH="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\"
rem : set path for source EPANET files
SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src"
CALL %SDK_PATH%SetEnv.cmd /x86 /release
CHDIR /D %SRC_PATH%
del %SRC_PATH%\*.dll
del %SRC_PATH%\*.exe
rem : do the magic ...
rem : creat EPANET2.DLL
cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:..\build\winsdk\epanet2.def /MAP
rem : creat EPANET2.EXE
rem : first option is the standalone EXE
cl -o epanet2.exe epanet.c ..\run\main.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /I ..\src /link
rem : second option is a linked EXE (linked to the epanet2.dll)
rem cl -o epanet2.exe ..\run\main.c epanet2.lib /I ..\include /I ..\run /I ..\src /link
rem : a bit of housekeeping and cleaning
del %SRC_PATH%\*.obj
del %SRC_PATH%\*.exp
del %SRC_PATH%\*.lib
del %SRC_PATH%\*.map