separate static and dynamic builds
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
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)