mirror of
https://github.com/holub/mame
synced 2025-07-07 10:58:41 +03:00
Add NetBSD support.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
This commit is contained in:
parent
24bfd3e8e8
commit
910f0215e8
24
makefile
24
makefile
@ -296,6 +296,10 @@ ifeq ($(TARGETOS),freebsd)
|
||||
OSD := sdl
|
||||
endif
|
||||
|
||||
ifeq ($(TARGETOS),netbsd)
|
||||
OSD := sdl
|
||||
endif
|
||||
|
||||
ifeq ($(TARGETOS),solaris)
|
||||
OSD := sdl
|
||||
endif
|
||||
@ -1004,6 +1008,26 @@ freebsd_x86: generate $(PROJECTDIR)/gmake-freebsd/Makefile
|
||||
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-freebsd config=$(CONFIG)32
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-netbsd
|
||||
#-------------------------------------------------
|
||||
|
||||
|
||||
$(PROJECTDIR)/gmake-netbsd/Makefile: makefile $(SCRIPTS) $(GENIE)
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=netbsd --gcc_version=$(GCC_VERSION) gmake
|
||||
|
||||
.PHONY: netbsd_x64
|
||||
netbsd_x64: generate $(PROJECTDIR)/gmake-netbsd/Makefile
|
||||
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)64
|
||||
|
||||
.PHONY: netbsd
|
||||
netbsd: netbsd_x86
|
||||
|
||||
.PHONY: netbsd_x86
|
||||
netbsd_x86: generate $(PROJECTDIR)/gmake-netbsd/Makefile
|
||||
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)32
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# Clean/bootstrap
|
||||
#-------------------------------------------------
|
||||
|
@ -534,6 +534,13 @@ project "portmidi"
|
||||
MAME_DIR .. "3rdparty/portmidi/porttime/ptlinux.c",
|
||||
}
|
||||
end
|
||||
if _OPTIONS["targetos"]=="netbsd" then
|
||||
files {
|
||||
MAME_DIR .. "3rdparty/portmidi/pm_linux/pmlinux.c",
|
||||
MAME_DIR .. "3rdparty/portmidi/pm_linux/finddefault.c",
|
||||
MAME_DIR .. "3rdparty/portmidi/porttime/ptlinux.c",
|
||||
}
|
||||
end
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
files {
|
||||
MAME_DIR .. "3rdparty/portmidi/pm_mac/pmmac.c",
|
||||
@ -591,6 +598,11 @@ project "bgfx"
|
||||
MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
|
||||
}
|
||||
|
||||
configuration { "netbsd" }
|
||||
includedirs {
|
||||
MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
|
||||
}
|
||||
|
||||
configuration { "gmake" }
|
||||
buildoptions {
|
||||
"-Wno-uninitialized",
|
||||
|
@ -24,6 +24,7 @@ newoption {
|
||||
{ "mingw-clang", "MinGW (clang compiler)" },
|
||||
{ "nacl", "Native Client" },
|
||||
{ "nacl-arm", "Native Client - ARM" },
|
||||
{ "netbsd", "NetBSD" },
|
||||
{ "osx", "OSX (GCC compiler)" },
|
||||
{ "osx-clang", "OSX (Clang compiler)" },
|
||||
{ "pnacl", "Native Client - PNaCl" },
|
||||
@ -147,6 +148,10 @@ function toolchain(_buildDir, _subDir)
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-freebsd")
|
||||
end
|
||||
|
||||
if "netbsd" == _OPTIONS["gcc"] then
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-netbsd")
|
||||
end
|
||||
|
||||
if "ios-arm" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
|
||||
premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
|
||||
@ -590,7 +595,29 @@ function toolchain(_buildDir, _subDir)
|
||||
|
||||
configuration { "freebsd", "x64", "Debug" }
|
||||
targetdir (_buildDir .. "freebsd" .. "/bin/x64/Debug")
|
||||
|
||||
|
||||
configuration { "netbsd", "x32" }
|
||||
objdir (_buildDir .. "netbsd" .. "/obj")
|
||||
buildoptions {
|
||||
"-m32",
|
||||
}
|
||||
configuration { "netbsd", "x32", "Release" }
|
||||
targetdir (_buildDir .. "netbsd" .. "/bin/x32/Release")
|
||||
|
||||
configuration { "netbsd", "x32", "Debug" }
|
||||
targetdir (_buildDir .. "netbsd" .. "/bin/x32/Debug")
|
||||
|
||||
configuration { "netbsd", "x64" }
|
||||
objdir (_buildDir .. "netbsd" .. "/obj")
|
||||
buildoptions {
|
||||
"-m64",
|
||||
}
|
||||
configuration { "netbsd", "x64", "Release" }
|
||||
targetdir (_buildDir .. "netbsd" .. "/bin/x64/Release")
|
||||
|
||||
configuration { "netbsd", "x64", "Debug" }
|
||||
targetdir (_buildDir .. "netbsd" .. "/bin/x64/Debug")
|
||||
|
||||
configuration { "android-*" }
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include",
|
||||
|
Loading…
Reference in New Issue
Block a user