summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2015-11-23 10:01:21 +0100
committerGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2015-11-23 10:01:21 +0100
commit4b4b6596799749fdd77f8aaf25e0b2f3289dba4a (patch) (github)
tree9dcff9fe8408e702dd8e497642125001768f856b /makefile
parent247036c2e562a3cfd9457dd3482fc74d577d3001 (diff)
downloadmame-4b4b6596799749fdd77f8aaf25e0b2f3289dba4a.tar.bz2
mame-4b4b6596799749fdd77f8aaf25e0b2f3289dba4a.zip
Added MSBUILD support, msbuild.exe must be in path so update your tools (nw)
Diffstat (limited to 'makefile')
-rw-r--r--makefile42
1 files changed, 40 insertions, 2 deletions
diff --git a/makefile b/makefile
index 0f380ece13b..9cc72273e7b 100644
--- a/makefile
+++ b/makefile
@@ -95,6 +95,8 @@
# FORCE_VERSION_COMPILE = 1
+# MS BUILD = 1
+
ifdef PREFIX_MAKEFILE
include $(PREFIX_MAKEFILE)
else
@@ -737,6 +739,24 @@ GCC_VERSION := $(shell gcc -dumpversion 2> NUL)
CLANG_VERSION := $(shell %CLANG%\bin\clang --version 2> NUL| head -n 1 | sed "s/[^0-9,.]//g")
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > NUL 2>&1 && echo python)
CHECK_CLANG :=
+ifdef MSBUILD
+MSBUILD_PARAMS := /v:minimal /m:$(NUMBER_OF_PROCESSORS)
+ifeq ($(CONFIG),debug)
+MSBUILD_PARAMS += /p:Configuration=Debug
+else
+MSBUILD_PARAMS += /p:Configuration=Release
+endif
+ifeq ($(ARCHITECTURE),_x64)
+MSBUILD_PARAMS += /p:Platform=x64
+else
+MSBUILD_PARAMS += /p:Platform=win32
+endif
+ifeq ($(SUBTARGET),mess)
+MSBUILD_SOLUTION := $(SUBTARGET).sln
+else
+MSBUILD_SOLUTION := $(TARGET)$(SUBTARGET).sln
+endif
+endif
else
GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
ifneq ($(OS),solaris)
@@ -834,12 +854,21 @@ vs2012_xp: generate
vs2013: generate
$(SILENT) $(GENIE) $(PARAMS) vs2013
+ifdef MSBUILD
+ $(SILENT) msbuild $(PROJECTDIR)/vs2013/$(MSBUILD_SOLUTION) $(MSBUILD_PARAMS)
+endif
vs2013_intel: generate
$(SILENT) $(GENIE) $(PARAMS) --vs=intel-15 vs2013
+ifdef MSBUILD
+ $(SILENT) msbuild $(PROJECTDIR)/vs2013-intel/$(MSBUILD_SOLUTION) $(MSBUILD_PARAMS)
+endif
vs2013_xp: generate
$(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-xp vs2013
+ifdef MSBUILD
+ $(SILENT) msbuild $(PROJECTDIR)/vs2013-xp/$(MSBUILD_SOLUTION) $(MSBUILD_PARAMS)
+endif
vs2013_clang: generate
$(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-clang vs2013
@@ -849,15 +878,24 @@ vs2013_winrt: generate
vs2015: generate
$(SILENT) $(GENIE) $(PARAMS) vs2015
+ifdef MSBUILD
+ $(SILENT) msbuild $(PROJECTDIR)/vs2015/$(MSBUILD_SOLUTION) $(MSBUILD_PARAMS)
+endif
vs2015_intel: generate
$(SILENT) $(GENIE) $(PARAMS) --vs=intel-15 vs2015
+ifdef MSBUILD
+ $(SILENT) msbuild $(PROJECTDIR)/vs2015-intel/$(MSBUILD_SOLUTION) $(MSBUILD_PARAMS)
+endif
vs2015_xp: generate
- $(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-xp vs2015
+ $(SILENT) $(GENIE) $(PARAMS) --vs=vs2015-xp vs2015
+ifdef MSBUILD
+ $(SILENT) msbuild $(PROJECTDIR)/vs2015-xp/$(MSBUILD_SOLUTION) $(MSBUILD_PARAMS)
+endif
vs2015_clang: generate
- $(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-clang vs2015
+ $(SILENT) $(GENIE) $(PARAMS) --vs=vs2015-clang vs2015
vs2015_winrt: generate
$(SILENT) $(GENIE) $(PARAMS) --vs=winstore81 vs2015