diff --git a/Makefile.vc b/Makefile.vc index 37f8646e..5232d7d4 100644 --- a/Makefile.vc +++ b/Makefile.vc @@ -87,13 +87,14 @@ CFGSET = TRUE # Usage # !IF "$(CFGSET)" == "FALSE" -!MESSAGE Usage: nmake /f makefile.vc9 [CFG=] [OBJDIR=] [RTLIBCFG=] [] +!MESSAGE Usage: nmake /f Makefile.vc [CFG=] [OBJDIR=] [RTLIBCFG=] [] !MESSAGE where is one of: !MESSAGE - release-static - release static library !MESSAGE - debug-static - debug static library -!MESSAGE - (empty) - perform a clean +!MESSAGE may be: +!MESSAGE - clean - perform a clean for CFG !MESSAGE -!MESSAGE controls the runtime library likage - can be 'static' or 'dynamic'. +!MESSAGE controls the runtime library linkage - can be 'static' or 'dynamic'. !MESSAGE can be left blank in which case all is assumed !MESSAGE is the path where you like to build (obj, bins, etc.) !MESSAGE default to ..\obj\ @@ -105,21 +106,9 @@ CFGSET = TRUE !ENDIF ####################### -# Only the clean target can be used if a config was not provided. +# Rules # -!IF "$(CFGSET)" == "FALSE" -!MESSAGE -!MESSAGE No configuration provided - performing a clean. -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE +!IF "$(CFGSET)" == "TRUE" # A config was provided, so the library can be built. # @@ -205,4 +194,14 @@ $(DIRBIN): $(MT) -manifest $@.manifest -outputresource:$@;1 del $@.manifest +clean: + @-erase /s $(DIROBJ)\*.dll 2> NUL + @-erase /s $(DIROBJ)\*.exp 2> NUL + @-erase /s $(DIROBJ)\*.idb 2> NUL + @-erase /s $(DIROBJ)\*.lib 2> NUL + @-erase /s $(DIROBJ)\*.obj 2> NUL + @-erase /s $(DIROBJ)\*.pch 2> NUL + @-erase /s $(DIROBJ)\*.pdb 2> NUL + @-erase /s $(DIROBJ)\*.res 2> NUL + !ENDIF # End of case where a config was provided.