aboutsummaryrefslogtreecommitdiffstats
path: root/mk.bat
blob: 9bf8dd9e6c6c3b7289d63ba679a31d7548a9b519 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@echo off
if "%1"=="-s" (
  echo use static lib
  set CFLAGS=%CFLAGS% /DMCLBN_NO_AUTOLINK /DBLS_DONT_EXPORT
) else if "%1"=="-d" (
  echo use dynamic lib
) else (
  echo "mk (-s|-d) <source file>"
  goto exit
)
set CFLAGS=%CFLAGS% -I../mcl/include
set SRC=%2
set EXE=%SRC:.cpp=.exe%
set EXE=%EXE:.c=.exe%
set EXE=%EXE:test\=bin\%
set EXE=%EXE:sample\=bin\%
echo cl %CFLAGS% %2 /Fe:%EXE% /link %LDFLAGS%
cl %CFLAGS% %2 /Fe:%EXE% /link %LDFLAGS%

:exit