Merge pull request #916 from h0tw1r3/master

support msbuild from posix shell
This commit is contained in:
Miodrag Milanović 2016-06-01 07:50:00 +02:00
commit 55e1d94766
4 changed files with 37 additions and 14 deletions

View File

@ -844,6 +844,22 @@ MSBUILD_PARAMS += /p:Platform=x64
else
MSBUILD_PARAMS += /p:Platform=win32
endif
ifeq (posix,$(SHELLTYPE))
MSBUILD_PARAMS := $(subst /,-,$(MSBUILD_PARAMS))
endif
endif
ifdef FASTBUILD
FASTBUILD_PARAMS := -j$(NUMBER_OF_PROCESSORS)
ifeq ($(CONFIG),debug)
FASTBUILD_TARGET := all-Debug
else
FASTBUILD_TARGET := all-Release
endif
ifeq ($(ARCHITECTURE),_x64)
FASTBUILD_PARAMS += $(FASTBUILD_TARGET)-x64
else
FASTBUILD_PARAMS += $(FASTBUILD_TARGET)-x32
endif
endif
else
GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> /dev/null)
@ -971,21 +987,21 @@ windows_x86_clang: generate $(PROJECTDIR)/gmake-mingw-clang/Makefile
vs2013: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) vs2013
ifdef MSBUILD
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2013/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2013/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
endif
.PHONY: vs2013_intel
vs2013_intel: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=intel-15 vs2013
ifdef MSBUILD
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2013-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2013-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
endif
.PHONY: vs2013_xp
vs2013_xp: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=vs2013-xp vs2013
ifdef MSBUILD
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2013-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2013-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
endif
#-------------------------------------------------
@ -996,28 +1012,35 @@ endif
vs2015: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) vs2015
ifdef MSBUILD
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2015/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2015/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
endif
.PHONY: vs2015_intel
vs2015_intel: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=intel-15 vs2015
ifdef MSBUILD
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2015-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2015-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
endif
.PHONY: vs2015_xp
vs2015_xp: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=vs2015-xp vs2015
ifdef MSBUILD
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2015-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2015-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
endif
.PHONY: vs2015_uwp
vs2015_uwp: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=winstore82 --osd=windows --NO_USE_MIDI=1 --USE_LIBUV=0 --NO_OPENGL=1 --USE_QTDEBUG=0 --MODERN_WIN_API=1 vs2015
ifdef MSBUILD
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2015-winstore82/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2015-winstore82/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
endif
.PHONY: vs2015_fastbuild
vs2015_fastbuild: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) vs2015-fastbuild
ifdef FASTBUILD
$(SILENT) fbuild.exe -config $(PROJECTDIR_WIN)/vs2015-fastbuild/ftbuild.bff $(FASTBUILD_PARAMS)
endif
#-------------------------------------------------

View File

@ -1265,7 +1265,7 @@ end
includedirs {
MAME_DIR .. "3rdparty/dxsdk/Include"
}
configuration { "vs2015" }
configuration { "vs2015*" }
buildoptions {
"/wd4334", -- warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration

View File

@ -60,7 +60,7 @@ if _OPTIONS["vs"]=="intel-15" then
"/Qwd869", -- remark #869: parameter "xxx" was never referenced
}
end
configuration { "vs2015" }
configuration { "vs2015*" }
buildoptions {
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
@ -284,7 +284,7 @@ end
"-include stdint.h"
}
configuration { "vs2015" }
configuration { "vs2015*" }
buildoptions {
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
@ -372,7 +372,7 @@ if _OPTIONS["vs"]=="intel-15" then
"/Qwd869", -- remark #869: parameter "xxx" was never referenced
}
end
configuration { "vs2015" }
configuration { "vs2015*" }
buildoptions {
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
"/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter
@ -595,7 +595,7 @@ if _OPTIONS["vs"]=="intel-15" then
}
end
configuration { "vs2015" }
configuration { "vs2015*" }
buildoptions {
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
@ -840,7 +840,7 @@ end
-- "/Qwd1879", -- warning #1879: unimplemented pragma ignored
-- }
--end
-- configuration { "vs2015" }
-- configuration { "vs2015*" }
-- buildoptions {
-- "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
-- }

View File

@ -373,7 +373,7 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-ci20")
end
elseif _ACTION == "vs2013" or _ACTION == "vs2015" then
elseif _ACTION == "vs2013" or _ACTION == "vs2015" or _ACTION == "vs2015-fastbuild" then
if (_ACTION .. "-clang") == _OPTIONS["vs"] then
premake.vstudio.toolset = ("LLVM-" .. _ACTION)