build and test with dll on MSVC
diff --git a/appveyor.yml b/appveyor.yml
index 02c3430..b790702 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -16,6 +16,7 @@ build_script:
if "Visual Studio 2017"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
- nmake -f makefile.msvc all
+ nmake -f makefile.msvc all CFLAGS="/Ox /MD"
test_script:
- cmd: test.exe
+- cmd: test_dll.exe
diff --git a/makefile.msvc b/makefile.msvc
index e3d6e23..1e5029f 100644
--- a/makefile.msvc
+++ b/makefile.msvc
@@ -71,10 +71,15 @@ $(LIBMAIN_D) $(LIBMAIN_I): $(OBJECTS) tommath.def
#Build test suite
test.exe: $(LIBMAIN_S) demo/shared.obj demo/test.obj
- cl $(LTM_CFLAGS) $(TOBJECTS) $(LIBMAIN_S) $(LTM_LDFLAGS) demo/shared.c demo/test.c /Fe$@
+ link $(TOBJECTS) $(LTM_LDFLAGS) $? /out:$@
@echo NOTICE: start the tests by launching test.exe
-all: $(LIBMAIN_S) test.exe $(LIBMAIN_D)
+#Build test suite for dll
+test_dll.exe: $(LIBMAIN_I) demo/shared.obj demo/test.obj
+ link $(TOBJECTS) $(LTM_LDFLAGS) $? /out:$@
+ @echo NOTICE: start the tests by launching test_dll.exe
+
+all: $(LIBMAIN_S) test.exe $(LIBMAIN_D) test_dll.exe
tune: $(LIBMAIN_S)
$(MAKE) -C etc tune