trunk/scripts/genie.lua
| r245234 | r245235 | |
| 5 | 5 | local naclToolchain = "" |
| 6 | 6 | |
| 7 | 7 | |
| 8 | | function includeosd() |
| 9 | | includedirs { |
| 10 | | MAME_DIR .. "src/osd", |
| 11 | | } |
| 12 | | if _OPTIONS["osd"]=="windows" then |
| 13 | | includedirs { |
| 14 | | MAME_DIR .. "src/osd/windows", |
| 15 | | } |
| 16 | | else |
| 17 | | includedirs { |
| 18 | | MAME_DIR .. "src/osd/sdl", |
| 19 | | } |
| 20 | | end |
| 21 | | end |
| 22 | | |
| 23 | 8 | function str_to_version (str) |
| 24 | 9 | local val = 0 |
| 25 | 10 | if (str == nil or str == '') then |
| r245234 | r245235 | |
| 277 | 262 | dofile ("toolchain.lua") |
| 278 | 263 | |
| 279 | 264 | |
| 280 | | if _OPTIONS["osd"]=="windows" then |
| 281 | | forcedincludes { |
| 282 | | MAME_DIR .. "src/osd/windows/winprefix.h" |
| 283 | | } |
| 284 | | elseif _OPTIONS["osd"]=="sdl" then |
| 285 | | forcedincludes { |
| 286 | | MAME_DIR .. "src/osd/sdl/sdlprefix.h" |
| 287 | | } |
| 288 | | end |
| 289 | | |
| 290 | 265 | if _OPTIONS["targetos"]=="windows" then |
| 291 | 266 | configuration { "x64" } |
| 292 | 267 | defines { |
| r245234 | r245235 | |
| 703 | 678 | "-static-libstdc++", |
| 704 | 679 | "-municode", |
| 705 | 680 | } |
| 706 | | if _OPTIONS["osd"]=="sdl" then |
| 707 | | linkoptions { |
| 708 | | "-Wl,--allow-multiple-definition", |
| 709 | | "-static" |
| 710 | | } |
| 711 | | links { |
| 712 | | "opengl32", |
| 713 | | "SDL2", |
| 714 | | "Imm32", |
| 715 | | "version", |
| 716 | | "ole32", |
| 717 | | "oleaut32", |
| 718 | | } |
| 719 | | end |
| 720 | 681 | links { |
| 721 | 682 | "user32", |
| 722 | 683 | "gdi32", |
| r245234 | r245235 | |
| 871 | 832 | |
| 872 | 833 | configuration { } |
| 873 | 834 | |
| 835 | |
| 874 | 836 | group "libs" |
| 875 | | dofile(path.join("src", "3rdparty.lua")) |
| 876 | | dofile(path.join("src", "lib.lua")) |
| 877 | 837 | |
| 878 | | group "core" |
| 879 | | |
| 880 | 838 | if (not os.isfile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua"))) then |
| 881 | 839 | error("Unsupported value '" .. _OPTIONS["osd"] .. "' for OSD") |
| 882 | 840 | end |
| 883 | | |
| 884 | 841 | dofile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua")) |
| 842 | |
| 843 | dofile(path.join("src", "3rdparty.lua")) |
| 844 | dofile(path.join("src", "lib.lua")) |
| 845 | |
| 846 | group "core" |
| 847 | |
| 885 | 848 | dofile(path.join("src", "emu.lua")) |
| 886 | 849 | emuProject(_OPTIONS["target"],_OPTIONS["subtarget"]) |
| 887 | 850 | |
trunk/scripts/src/main.lua
| r245234 | r245235 | |
| 5 | 5 | project (_target .. _subtarget) |
| 6 | 6 | end |
| 7 | 7 | uuid (os.uuid(_target .."_" .. _subtarget)) |
| 8 | | kind "ConsoleApp" |
| 8 | kind "ConsoleApp" |
| 9 | 9 | |
| 10 | 10 | options { |
| 11 | 11 | "ForceCPP", |
| r245234 | r245235 | |
| 27 | 27 | "-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/osd/sdl/" .. _OPTIONS["target"] .. "-Info.plist" |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | | configuration { "mingw*" } |
| 30 | configuration { "mingw*" or "vs*" } |
| 31 | 31 | if _OPTIONS["osd"]=="sdl" then |
| 32 | 32 | targetprefix "sdl" |
| 33 | 33 | end |
| 34 | 34 | targetextension ".exe" |
| 35 | | |
| 36 | | configuration { "vs*" } |
| 37 | | if _OPTIONS["osd"]=="sdl" then |
| 38 | | targetprefix "sdl" |
| 39 | | end |
| 40 | | targetextension ".exe" |
| 41 | | |
| 35 | |
| 42 | 36 | configuration { "asmjs" } |
| 43 | 37 | targetextension ".bc" |
| 44 | | |
| 38 | |
| 45 | 39 | configuration { } |
| 46 | 40 | targetdir(MAME_DIR) |
| 47 | 41 | |
| r245234 | r245235 | |
| 76 | 70 | "ocore_" .. _OPTIONS["osd"], |
| 77 | 71 | } |
| 78 | 72 | dofile("src/osd/" .. _OPTIONS["osd"] .. "_cfg.lua") |
| 79 | | |
| 73 | |
| 80 | 74 | includedirs { |
| 81 | 75 | MAME_DIR .. "src/emu", |
| 82 | 76 | MAME_DIR .. "src/mame", |
| r245234 | r245235 | |
| 99 | 93 | rcfile, |
| 100 | 94 | } |
| 101 | 95 | else |
| 102 | | files { |
| 103 | | MAME_DIR .. "src/osd/windows/mame.rc", |
| 104 | | } |
| 96 | files { |
| 97 | MAME_DIR .. "src/osd/windows/mame.rc", |
| 98 | } |
| 105 | 99 | end |
| 106 | 100 | end |
| 107 | 101 | |