mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
removed nacl, fixed android and pnacl (nw)
This commit is contained in:
parent
6a9a48a976
commit
4173530610
63
makefile
63
makefile
@ -819,11 +819,13 @@ endif
|
||||
GENIE := 3rdparty/genie/bin/$(GENIEOS)/genie$(EXE)
|
||||
|
||||
ifeq ($(TARGET),$(SUBTARGET))
|
||||
SUBDIR := $(OSD)/$(TARGET)
|
||||
FULLTARGET := $(TARGET)
|
||||
else
|
||||
SUBDIR := $(OSD)/$(TARGET)$(SUBTARGET)
|
||||
FULLTARGET := $(TARGET)$(SUBTARGET)
|
||||
endif
|
||||
PROJECTDIR := $(BUILDDIR)/projects/$(SUBDIR)
|
||||
PROJECTDIR := $(BUILDDIR)/projects/$(OSD)/$(FULLTARGET)
|
||||
PROJECTDIR_MINI := $(BUILDDIR)/projects/osdmini/$(FULLTARGET)
|
||||
PROJECTDIR_WIN := $(BUILDDIR)/projects/windows/$(FULLTARGET)
|
||||
|
||||
.PHONY: all clean regenie generate
|
||||
all: $(GENIE) $(TARGETOS)$(ARCHITECTURE)
|
||||
@ -887,54 +889,46 @@ windows_x86_clang: generate $(PROJECTDIR)/gmake-mingw-clang/Makefile
|
||||
|
||||
.PHONY: vs2013
|
||||
vs2013: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) vs2013
|
||||
$(SILENT) $(GENIE) $(PARAMS) --osd=windows --targetos=windows vs2013
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild $(PROJECTDIR)/vs2013/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2013/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
|
||||
.PHONY: vs2013_intel
|
||||
vs2013_intel: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=intel-15 vs2013
|
||||
$(SILENT) $(GENIE) $(PARAMS) --osd=windows --targetos=windows --vs=intel-15 vs2013
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild $(PROJECTDIR)/vs2013-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
$(SILENT) msbuild $(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
|
||||
$(SILENT) $(GENIE) $(PARAMS) --osd=windows --targetos=windows --vs=vs2013-xp vs2013
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild $(PROJECTDIR)/vs2013-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2013-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
|
||||
.PHONY: vs2013_winrt
|
||||
vs2013_winrt: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=winstore81 vs2013
|
||||
|
||||
.PHONY: vs2015
|
||||
vs2015: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) vs2015
|
||||
$(SILENT) $(GENIE) $(PARAMS) --osd=windows --targetos=windows vs2015
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild $(PROJECTDIR)/vs2015/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2015/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
|
||||
.PHONY: vs2015_intel
|
||||
vs2015_intel: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=intel-15 vs2015
|
||||
$(SILENT) $(GENIE) $(PARAMS) --osd=windows --targetos=windows --vs=intel-15 vs2015
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild $(PROJECTDIR)/vs2015-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
$(SILENT) msbuild $(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
|
||||
$(SILENT) $(GENIE) $(PARAMS) --osd=windows --targetos=windows --vs=vs2015-xp vs2015
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild $(PROJECTDIR)/vs2015-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
$(SILENT) msbuild $(PROJECTDIR_WIN)/vs2015-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
|
||||
.PHONY: vs2015_winrt
|
||||
vs2015_winrt: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=winstore81 vs2015
|
||||
|
||||
.PHONY: android-arm
|
||||
android-arm: generate
|
||||
ifndef ANDROID_NDK_ARM
|
||||
@ -944,9 +938,10 @@ ifndef ANDROID_NDK_ROOT
|
||||
$(error ANDROID_NDK_ROOT is not set)
|
||||
endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=android-arm --gcc_version=4.8 gmake
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-arm --gcc_version=4.9 --osd=osdmini --targetos=android-arm --PLATFORM=arm --NOASM=1 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-arm config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-android-arm config=$(CONFIG) precompile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-android-arm config=$(CONFIG)
|
||||
|
||||
.PHONY: android-mips
|
||||
android-mips: generate
|
||||
@ -957,9 +952,10 @@ ifndef ANDROID_NDK_ROOT
|
||||
$(error ANDROID_NDK_ROOT is not set)
|
||||
endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=android-mips --gcc_version=4.8 gmake
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-mips --gcc_version=4.9 --osd=osdmini --targetos=android-mips --PLATFORM=mips --NOASM=1 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-mips config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-android-mips config=$(CONFIG) precompile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-android-mips config=$(CONFIG)
|
||||
|
||||
.PHONY: android-x86
|
||||
android-x86: generate
|
||||
@ -970,9 +966,10 @@ ifndef ANDROID_NDK_ROOT
|
||||
$(error ANDROID_NDK_ROOT is not set)
|
||||
endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=android-x86 --gcc_version=4.8 gmake
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-x86 --gcc_version=4.9 --osd=osdmini --targetos=android-x86 --PLATFORM=x86 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-x86 config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-android-x86 config=$(CONFIG) precompile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-android-x86 config=$(CONFIG)
|
||||
|
||||
.PHONY: asmjs
|
||||
asmjs: generate
|
||||
@ -980,8 +977,9 @@ ifndef EMSCRIPTEN
|
||||
$(error EMSCRIPTEN is not set)
|
||||
endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=asmjs --gcc_version=4.9 gmake
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=asmjs --gcc_version=3.7.0 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-asmjs config=$(CONFIG) precompile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-asmjs config=$(CONFIG)
|
||||
|
||||
.PHONY: pnacl
|
||||
@ -990,9 +988,10 @@ ifndef NACL_SDK_ROOT
|
||||
$(error NACL_SDK_ROOT is not set)
|
||||
endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=pnacl --gcc_version=4.8 gmake
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=pnacl --gcc_version=3.7.0 --osd=osdmini --targetos=pnacl --NOASM=1 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-pnacl config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-pnacl config=$(CONFIG) precompile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_MINI)/gmake-pnacl config=$(CONFIG)
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-linux
|
||||
|
@ -955,7 +955,7 @@ end
|
||||
|
||||
|
||||
local version = str_to_version(_OPTIONS["gcc_version"])
|
||||
if string.find(_OPTIONS["gcc"], "clang") then
|
||||
if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "pnacl") or string.find(_OPTIONS["gcc"], "asmjs") then
|
||||
if (version < 30400) then
|
||||
print("Clang version 3.4 or later needed")
|
||||
os.exit(-1)
|
||||
@ -1043,13 +1043,6 @@ configuration { "pnacl" }
|
||||
}
|
||||
archivesplit_size "20"
|
||||
|
||||
configuration { "nacl*" }
|
||||
buildoptions_cpp {
|
||||
"-x c++",
|
||||
"-std=c++14",
|
||||
}
|
||||
archivesplit_size "20"
|
||||
|
||||
configuration { "linux-*" }
|
||||
links {
|
||||
"dl",
|
||||
|
@ -27,8 +27,6 @@ newoption {
|
||||
{ "mingw32-gcc", "MinGW32" },
|
||||
{ "mingw64-gcc", "MinGW64" },
|
||||
{ "mingw-clang", "MinGW (clang compiler)" },
|
||||
{ "nacl", "Native Client" },
|
||||
{ "nacl-arm", "Native Client - ARM" },
|
||||
{ "netbsd", "NetBSD" },
|
||||
{ "os2", "OS/2" },
|
||||
{ "osx", "OSX (GCC compiler)" },
|
||||
@ -253,44 +251,6 @@ function toolchain(_buildDir, _subDir)
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw-clang")
|
||||
end
|
||||
|
||||
if "nacl" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("NACL_SDK_ROOT") then
|
||||
print("Set NACL_SDK_ROOT enviroment variables.")
|
||||
end
|
||||
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-"
|
||||
if os.is("macosx") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_x86_newlib/bin/x86_64-nacl-"
|
||||
elseif os.is("linux") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_x86_newlib/bin/x86_64-nacl-"
|
||||
end
|
||||
|
||||
premake.gcc.cc = naclToolchain .. "gcc"
|
||||
premake.gcc.cxx = naclToolchain .. "g++"
|
||||
premake.gcc.ar = naclToolchain .. "ar"
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-nacl")
|
||||
end
|
||||
|
||||
if "nacl-arm" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("NACL_SDK_ROOT") then
|
||||
print("Set NACL_SDK_ROOT enviroment variables.")
|
||||
end
|
||||
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-"
|
||||
if os.is("macosx") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_arm_newlib/bin/arm-nacl-"
|
||||
elseif os.is("linux") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_arm_newlib/bin/arm-nacl-"
|
||||
end
|
||||
|
||||
premake.gcc.cc = naclToolchain .. "gcc"
|
||||
premake.gcc.cxx = naclToolchain .. "g++"
|
||||
premake.gcc.ar = naclToolchain .. "ar"
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-nacl-arm")
|
||||
end
|
||||
|
||||
if "osx" == _OPTIONS["gcc"] then
|
||||
if os.is("linux") then
|
||||
premake.gcc.cc = toolchainPrefix .. "clang"
|
||||
@ -669,7 +629,7 @@ function toolchain(_buildDir, _subDir)
|
||||
|
||||
configuration { "android-*" }
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/android/native_app_glue",
|
||||
}
|
||||
linkoptions {
|
||||
@ -712,11 +672,11 @@ function toolchain(_buildDir, _subDir)
|
||||
targetdir (_buildDir .. "android-arm" .. "/bin")
|
||||
objdir (_buildDir .. "android-arm" .. "/obj")
|
||||
libdirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/include",
|
||||
}
|
||||
buildoptions {
|
||||
@ -738,11 +698,11 @@ function toolchain(_buildDir, _subDir)
|
||||
targetdir (_buildDir .. "android-mips" .. "/bin")
|
||||
objdir (_buildDir .. "android-mips" .. "/obj")
|
||||
libdirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips/include",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/include",
|
||||
}
|
||||
buildoptions {
|
||||
@ -758,11 +718,11 @@ function toolchain(_buildDir, _subDir)
|
||||
targetdir (_buildDir .. "android-x86" .. "/bin")
|
||||
objdir (_buildDir .. "android-x86" .. "/obj")
|
||||
libdirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/include",
|
||||
}
|
||||
buildoptions {
|
||||
@ -801,7 +761,7 @@ function toolchain(_buildDir, _subDir)
|
||||
"-Wno-extern-c-compat",
|
||||
}
|
||||
|
||||
configuration { "nacl or nacl-arm or pnacl" }
|
||||
configuration { "pnacl" }
|
||||
buildoptions {
|
||||
"-U__STRICT_ANSI__", -- strcasecmp, setenv, unsetenv,...
|
||||
"-fno-stack-protector",
|
||||
@ -810,12 +770,7 @@ function toolchain(_buildDir, _subDir)
|
||||
"-ffunction-sections",
|
||||
"-Wunused-value",
|
||||
}
|
||||
configuration { "nacl or nacl-arm" }
|
||||
includedirs {
|
||||
"$(NACL_SDK_ROOT)/include",
|
||||
"$(NACL_SDK_ROOT)/include/newlib",
|
||||
}
|
||||
|
||||
|
||||
configuration { "pnacl" }
|
||||
buildoptions {
|
||||
"-Wno-tautological-undefined-compare",
|
||||
@ -826,36 +781,6 @@ function toolchain(_buildDir, _subDir)
|
||||
"$(NACL_SDK_ROOT)/include/pnacl",
|
||||
}
|
||||
|
||||
configuration { "x32", "nacl" }
|
||||
targetdir (_buildDir .. "nacl-x86" .. "/bin/x32")
|
||||
objdir (_buildDir .. "nacl-x86" .. "/obj")
|
||||
|
||||
configuration { "x32", "nacl", "Debug" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Debug" }
|
||||
|
||||
configuration { "x32", "nacl", "Release" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Release" }
|
||||
|
||||
configuration { "x64", "nacl" }
|
||||
targetdir (_buildDir .. "nacl-x64" .. "/bin/x64")
|
||||
objdir (_buildDir .. "nacl-x64" .. "/obj")
|
||||
|
||||
configuration { "x64", "nacl", "Debug" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Debug" }
|
||||
|
||||
configuration { "x64", "nacl", "Release" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Release" }
|
||||
|
||||
configuration { "nacl-arm" }
|
||||
targetdir (_buildDir .. "nacl-arm" .. "/bin")
|
||||
objdir (_buildDir .. "nacl-arm" .. "/obj")
|
||||
|
||||
configuration { "nacl-arm", "Debug" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Debug" }
|
||||
|
||||
configuration { "nacl-arm", "Release" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Release" }
|
||||
|
||||
configuration { "pnacl" }
|
||||
targetdir (_buildDir .. "pnacl" .. "/bin")
|
||||
objdir (_buildDir .. "pnacl" .. "/obj")
|
||||
@ -971,12 +896,6 @@ function strip()
|
||||
"$(SILENT) " .. naclToolchain .. "finalize \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "*nacl*", "Release" }
|
||||
postbuildcommands {
|
||||
"$(SILENT) echo Stripping symbols.",
|
||||
"$(SILENT) " .. naclToolchain .. "strip -s \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "asmjs" }
|
||||
postbuildcommands {
|
||||
"$(SILENT) echo Running asmjs finalize.",
|
||||
|
Loading…
Reference in New Issue
Block a user