aboutsummaryrefslogtreecommitdiffstats
path: root/mk.bat
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-08-13 14:14:02 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-08-13 14:14:02 +0800
commit6f89684faa0ee752e901053f7508eb05d158b2eb (patch)
tree05f7e237bc524f30d323df74dc343065382f0ac2 /mk.bat
parentf25b779d48f3682a03a001f8ce0386eebd43de68 (diff)
downloaddexon-bls-6f89684faa0ee752e901053f7508eb05d158b2eb.tar
dexon-bls-6f89684faa0ee752e901053f7508eb05d158b2eb.tar.gz
dexon-bls-6f89684faa0ee752e901053f7508eb05d158b2eb.tar.bz2
dexon-bls-6f89684faa0ee752e901053f7508eb05d158b2eb.tar.lz
dexon-bls-6f89684faa0ee752e901053f7508eb05d158b2eb.tar.xz
dexon-bls-6f89684faa0ee752e901053f7508eb05d158b2eb.tar.zst
dexon-bls-6f89684faa0ee752e901053f7508eb05d158b2eb.zip
fix bat files for make windows binary
Diffstat (limited to 'mk.bat')
-rw-r--r--mk.bat22
1 files changed, 16 insertions, 6 deletions
diff --git a/mk.bat b/mk.bat
index b86d127..c5dfac9 100644
--- a/mk.bat
+++ b/mk.bat
@@ -1,9 +1,19 @@
@echo off
-
-call setvar.bat lib
-set SRC=%1
+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 SRC=%2
set EXE=%SRC:.cpp=.exe%
set EXE=%EXE:.c=.exe%
-set EXE=%EXE:test/=bin/%
-set EXE=%EXE:sample/=bin/%
-cl %CFLAGS% %1 %2 %3 /Fe:%EXE% /link %LDFLAGS%
+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