Previous 199869 Revisions Next

r39881 Tuesday 14th July, 2015 at 19:52:52 UTC by Thomas Klausner
Add NetBSD support.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
[/trunk]makefile
[scripts]toolchain.lua
[scripts/src]3rdparty.lua

trunk/makefile
r248392r248393
296296OSD := sdl
297297endif
298298
299ifeq ($(TARGETOS),netbsd)
300OSD := sdl
301endif
302
299303ifeq ($(TARGETOS),solaris)
300304OSD := sdl
301305endif
r248392r248393
10051009
10061010
10071011#-------------------------------------------------
1012# gmake-netbsd
1013#-------------------------------------------------
1014
1015
1016$(PROJECTDIR)/gmake-netbsd/Makefile: makefile $(SCRIPTS) $(GENIE)
1017   $(SILENT) $(GENIE) $(PARAMS) --gcc=netbsd --gcc_version=$(GCC_VERSION) gmake
1018
1019.PHONY: netbsd_x64
1020netbsd_x64: generate $(PROJECTDIR)/gmake-netbsd/Makefile
1021   $(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)64
1022
1023.PHONY: netbsd
1024netbsd: netbsd_x86
1025
1026.PHONY: netbsd_x86
1027netbsd_x86: generate $(PROJECTDIR)/gmake-netbsd/Makefile
1028   $(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)32
1029
1030
1031#-------------------------------------------------
10081032# Clean/bootstrap
10091033#-------------------------------------------------
10101034
trunk/scripts/src/3rdparty.lua
r248392r248393
534534         MAME_DIR .. "3rdparty/portmidi/porttime/ptlinux.c",
535535      }
536536   end
537   if _OPTIONS["targetos"]=="netbsd" then
538      files {
539         MAME_DIR .. "3rdparty/portmidi/pm_linux/pmlinux.c",
540         MAME_DIR .. "3rdparty/portmidi/pm_linux/finddefault.c",
541         MAME_DIR .. "3rdparty/portmidi/porttime/ptlinux.c",
542      }
543   end
537544   if _OPTIONS["targetos"]=="macosx" then
538545      files {
539546         MAME_DIR .. "3rdparty/portmidi/pm_mac/pmmac.c",
r248392r248393
591598         MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
592599      }
593600
601   configuration { "netbsd" }
602      includedirs {
603         MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
604      }
605
594606   configuration { "gmake" }
595607      buildoptions {     
596608         "-Wno-uninitialized",
trunk/scripts/toolchain.lua
r248392r248393
2424      { "mingw-clang",   "MinGW (clang compiler)" },
2525      { "nacl",          "Native Client"          },
2626      { "nacl-arm",      "Native Client - ARM"    },
27      { "netbsd",        "NetBSD"                },
2728      { "osx",           "OSX (GCC compiler)"     },
2829      { "osx-clang",     "OSX (Clang compiler)"   },
2930      { "pnacl",         "Native Client - PNaCl"  },
r248392r248393
147148         location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-freebsd")
148149      end
149150
151      if "netbsd" == _OPTIONS["gcc"] then
152         location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-netbsd")
153      end
154
150155      if "ios-arm" == _OPTIONS["gcc"] then
151156         premake.gcc.cc  = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
152157         premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
r248392r248393
590595   
591596   configuration { "freebsd", "x64", "Debug" }
592597      targetdir (_buildDir .. "freebsd" .. "/bin/x64/Debug")
593     
598
599   configuration { "netbsd", "x32" }
600      objdir (_buildDir .. "netbsd" .. "/obj")
601      buildoptions {
602         "-m32",
603      }
604   configuration { "netbsd", "x32", "Release" }
605      targetdir (_buildDir .. "netbsd" .. "/bin/x32/Release")
606
607   configuration { "netbsd", "x32", "Debug" }
608      targetdir (_buildDir .. "netbsd" .. "/bin/x32/Debug")
609
610   configuration { "netbsd", "x64" }
611      objdir (_buildDir .. "netbsd" .. "/obj")
612      buildoptions {
613         "-m64",
614      }
615   configuration { "netbsd", "x64", "Release" }
616      targetdir (_buildDir .. "netbsd" .. "/bin/x64/Release")
617
618   configuration { "netbsd", "x64", "Debug" }
619      targetdir (_buildDir .. "netbsd" .. "/bin/x64/Debug")
620
594621   configuration { "android-*" }
595622      includedirs {
596623         "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include",

Previous 199869 Revisions Next


© 1997-2024 The MAME Team