Commit 9fa740096b779d1567f4a9c02a07cdd6af3f44ac

Steffen Jaeckel 2020-09-15T19:05:20

separate static and dynamic builds

diff --git a/appveyor.yml b/appveyor.yml
index b790702..3e9ba4a 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -16,7 +16,9 @@ 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 CFLAGS="/Ox /MD"
+        nmake -f makefile.msvc test.exe
+        nmake -f makefile.msvc clean-obj
+        nmake -f makefile.msvc test_dll.exe CFLAGS="/Ox /MD /DLTM_TEST_DYNAMIC"
 test_script:
 - cmd: test.exe
 - cmd: test_dll.exe
diff --git a/makefile.msvc b/makefile.msvc
index 1e5029f..df886e9 100644
--- a/makefile.msvc
+++ b/makefile.msvc
@@ -71,13 +71,13 @@ $(LIBMAIN_D) $(LIBMAIN_I): $(OBJECTS) tommath.def
 
 #Build test suite
 test.exe: $(LIBMAIN_S) demo/shared.obj demo/test.obj
-       link $(TOBJECTS) $(LTM_LDFLAGS) $? /out:$@
+	link $(TOBJECTS) $(LTM_LDFLAGS) $? /out:$@
 	@echo NOTICE: start the tests by launching test.exe
 
 #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
+	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
 
@@ -85,8 +85,11 @@ tune: $(LIBMAIN_S)
 	$(MAKE) -C etc tune
 	$(MAKE)
 
-clean:
-	@-cmd /c del /Q /S *.OBJ *.LIB *.EXE *.DLL 2>nul
+clean-obj:
+	@-cmd /c del /Q /S *.OBJ 2>nul
+
+clean: clean-obj
+	@-cmd /c del /Q /S *.LIB *.EXE *.DLL 2>nul
 
 #Install the library + headers
 install: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D)