Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/genie/src/base/premake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

function premake.generate(obj, filename, callback)
filename = premake.project.getfilename(obj, filename)
printf("Generating %s...", filename)
printf("Generating %s ...", filename)

local f, err = io.open(filename, "wb")
if (not f) then
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/genie/src/host/scripts.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const char* builtin_scripts[] = {
"function premake.showhelp()\nprintf(_PREMAKE_COPYRIGHT)\nprintf(\"%s %s\", _VERSION, _COPYRIGHT)\nprintf(\"\")\nprintf(\"Usage: genie [options] action [arguments]\")\nprintf(\"\")\nprintf(\"OPTIONS\")\nprintf(\"\")\nfor option in premake.option.each() do\nlocal trigger = option.trigger\nlocal description = option.description\nif (option.value) then trigger = trigger .. \"=\" .. option.value end\nif (option.allowed) then description = description .. \"; one of:\" end\nprintf(\" --%-15s %s\", trigger, description) \nif (option.allowed) then\nfor _, value in ipairs(option.allowed) do\nprintf(\" %-14s %s\", value[1], value[2])\nend\nend\nprintf(\"\")\nend\nprintf(\"ACTIONS\")\nprintf(\"\")\nfor action in premake.action.each() do\nprintf(\" %-17s %s\", action.trigger, action.description)\nend\nprintf(\"\")\nprintf(\"For additional information, see http://industriousone.com/premake\")\nend\n",

/* base/premake.lua */
"function premake.generate(obj, filename, callback)\nfilename = premake.project.getfilename(obj, filename)\nprintf(\"Generating %s...\", filename)\nlocal f, err = io.open(filename, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nio.output(f)\ncallback(obj)\nf:close()\nend\nfunction premake.findDefaultScript(dir, search_upwards)\nsearch_upwards = search_upwards or true\nlocal last = \"\"\nwhile dir ~= last do\nfor _, name in ipairs({ \"genie.lua\", \"solution.lua\", \"premake4.lua\" }) do\nlocal script0 = dir .. \"/\" .. name\nif (os.isfile(script0)) then\nreturn dir, name\nend\nlocal script1 = dir .. \"/scripts/\" .. name\nif (os.isfile(script1)) then\nreturn dir .. \"/scripts/\", name\nend\nend\nlast = dir\ndir = path.getabsolute(dir .. \"/..\")\nif dir == \".\" or not search_upwards then break end\nend\nreturn nil, nil\nend",
"function premake.generate(obj, filename, callback)\nfilename = premake.project.getfilename(obj, filename)\nprintf(\"Generating %s ...\", filename)\nlocal f, err = io.open(filename, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nio.output(f)\ncallback(obj)\nf:close()\nend\nfunction premake.findDefaultScript(dir, search_upwards)\nsearch_upwards = search_upwards or true\nlocal last = \"\"\nwhile dir ~= last do\nfor _, name in ipairs({ \"genie.lua\", \"solution.lua\", \"premake4.lua\" }) do\nlocal script0 = dir .. \"/\" .. name\nif (os.isfile(script0)) then\nreturn dir, name\nend\nlocal script1 = dir .. \"/scripts/\" .. name\nif (os.isfile(script1)) then\nreturn dir .. \"/scripts/\", name\nend\nend\nlast = dir\ndir = path.getabsolute(dir .. \"/..\")\nif dir == \".\" or not search_upwards then break end\nend\nreturn nil, nil\nend",

/* actions/codeblocks/_codeblocks.lua */
"premake.codeblocks = { }\nnewaction {\ntrigger = \"codeblocks\",\nshortname = \"Code::Blocks\",\ndescription = \"Generate Code::Blocks project files\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\", \"ow\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.workspace\", premake.codeblocks.workspace)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.cbp\", premake.codeblocks.cbp)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"%%.workspace\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%.cbp\")\npremake.clean.file(prj, \"%%.depend\")\npremake.clean.file(prj, \"%%.layout\")\nend\n}\n",
Expand Down
21 changes: 10 additions & 11 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ endif
#-------------------------------------------------
# specify OS target, which further differentiates
# the underlying OS; supported values are:
# win32, unix, macosx, os2
# windows, linux, macosx, os2
#-------------------------------------------------

ifndef TARGETOS
Expand Down Expand Up @@ -396,7 +396,7 @@ ifndef MINGW64
$(error MINGW64 is not set)
endif
ifndef COMPILE
$(SILENT) $(GENIE) $(PARAMS) --gcc=mingw64-gcc --gcc_version=$(GCC_VERSION) gmake
$(SILENT) $(GENIE) $(PARAMS) --gcc=mingw64-gcc --gcc_version=$(GCC_VERSION) gmake
endif
$(SILENT) $(MAKE) --no-print-directory -R -C build/projects/$(SUBDIR)/gmake-mingw64-gcc config=$(CONFIG)64 WINDRES=$(WINDRES)

Expand All @@ -419,7 +419,7 @@ ifndef COMPILE
$(SILENT) $(GENIE) $(PARAMS) --gcc=mingw-clang --gcc_version=$(CLANG_VERSION) gmake
endif
$(SILENT) $(MAKE) --no-print-directory -R -C build/projects/$(SUBDIR)/gmake-mingw-clang config=$(CONFIG)64 WINDRES=$(WINDRES)

windows_x86_clang: generate
ifndef CLANG
$(error CLANG is not set)
Expand Down Expand Up @@ -669,24 +669,24 @@ generate: \
$(GENDIR)/m68kmake$(EXE) $(GENDIR)/emu/cpu/m68000/m68kops.c

$(GENDIR)/%.lh: $(SRC)/%.lay $(SRC)/build/file2str.py
@echo Converting $<...
@echo Converting $< ...
$(PYTHON) $(SRC)/build/file2str.py $< $@ layout_$(basename $(notdir $<))

$(GENDIR)/%.fh: $(SRC)/%.png $(SRC)/build/png2bdc.py $(SRC)/build/file2str.py
@echo Converting $<...
@echo Converting $< ...
$(PYTHON) $(SRC)/build/png2bdc.py $< $(GENDIR)/temp.bdc
$(PYTHON) $(SRC)/build/file2str.py $(GENDIR)/temp.bdc $@ font_$(basename $(notdir $<)) UINT8

$(GENDIR)/resource/$(TARGET)vers.rc: $(SRC)/build/verinfo.py $(SRC)/version.c
@echo Emitting $@...
@echo Emitting $@ ...
$(PYTHON) $(SRC)/build/verinfo.py -r -b $(TARGET) $(SRC)/version.c > $@

$(GENDIR)/resource/$(TARGET)-Info.plist: $(SRC)/build/verinfo.py $(SRC)/version.c
@echo Emitting $@...
@echo Emitting $@ ...
$(PYTHON) $(SRC)/build/verinfo.py -p -b $(TARGET) $(SRC)/version.c > $@

$(GENDIR)/$(TARGET)/$(SUBTARGET)/drivlist.c: $(SRC)/$(TARGET)/$(SUBTARGET).lst $(SRC)/build/makelist.py
@echo Building driver list $<...
@echo Building driver list $< ...
$(PYTHON) $(SRC)/build/makelist.py $< >$@

# rule to generate the C files
Expand Down Expand Up @@ -783,17 +783,16 @@ $(GENDIR)/m68kmake.o: src/emu/cpu/m68000/m68kmake.c
$(SILENT) $(CC) -x c++ -std=gnu++98 -o "$@" -c "$<"

$(GENDIR)/m68kmake$(EXE) : $(GENDIR)/m68kmake.o
@echo Linking $@...
@echo Linking $@ ...
$(LD) -lstdc++ $^ -o $@

$(GENDIR)/emu/cpu/m68000/m68kops.c: $(GENDIR)/m68kmake$(EXE) $(SRC)/emu/cpu/m68000/m68k_in.c
@echo Generating M68K source files...
$(SILENT) $(GENDIR)/m68kmake $(GENDIR)/emu/cpu/m68000 $(SRC)/emu/cpu/m68000/m68k_in.c

$(GENDIR)/mess/drivers/ymmu100.inc: $(SRC)/mess/drivers/ymmu100.ppm $(SRC)/build/file2str.py
@echo Converting $<...
@echo Converting $< ...
@$(PYTHON) $(SRC)/build/file2str.py $(SRC)/mess/drivers/ymmu100.ppm $@ ymmu100_bkg UINT8

$(GENDIR)/%.moc.c: $(SRC)/%.h
$(SILENT) $(MOC) $(MOCINCPATH) $< -o $@

94 changes: 47 additions & 47 deletions scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ BUSES = {}
newoption {
trigger = "with-tools",
description = "Enable building tools.",
}
}

newoption {
trigger = "osd",
Expand Down Expand Up @@ -130,47 +130,47 @@ newoption {
newoption {
trigger = "PROFILE",
description = "Enable profiling.",
}
}

newoption {
trigger = "SYMBOLS",
description = "Enable symbols.",
}
}

newoption {
trigger = "SYMLEVEL",
description = "Symbols level.",
}
}

newoption {
trigger = "PROFILER",
description = "Include the internal profiler.",
}
}

newoption {
trigger = "OPTIMIZE",
description = "Optimization level.",
}
}

newoption {
trigger = "ARCHOPTS",
description = "ARCHOPTS.",
}
}

newoption {
trigger = "MAP",
description = "Generate a link map.",
}
}

newoption {
trigger = "FORCE_DRC_C_BACKEND",
description = "Force DRC C backend.",
}
}

newoption {
trigger = "NOWERROR",
description = "NOWERROR",
}
}

newoption {
trigger = "USE_BGFX",
Expand All @@ -179,7 +179,7 @@ newoption {
{ "0", "Disabled" },
{ "1", "Enabled" },
}
}
}


local os_version = str_to_version(_OPTIONS["os_version"])
Expand All @@ -201,7 +201,7 @@ if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
solution (_OPTIONS["target"])
else
solution (_OPTIONS["target"] .. _OPTIONS["subtarget"])
end
end
configurations {
"Debug",
"Release",
Expand All @@ -220,7 +220,7 @@ end
"Unicode",
"NoPCH",
}

configuration { "vs*" }
flags {
"ExtraWarnings",
Expand All @@ -230,26 +230,26 @@ end
"FatalWarnings",
}
end


configuration { "Debug", "vs*" }
flags {
"Symbols",
}
}
configuration {}

--aftercompilefile ("\t$(SILENT) gawk -f ../../../../../scripts/depfilter.awk $(@:%.o=%.d) > $(@:%.o=%.dep)\n\t$(SILENT) mv $(@:%.o=%.dep) $(@:%.o=%.d)")


msgcompile ("Compiling $(subst ../,,$<)...")

msgcompile_objc ("Objective-C compiling $(subst ../,,$<)...")

msgresource ("Compiling resources $(subst ../,,$<)...")
msgcompile ("Compiling $(subst ../,,$<) ...")

msglinking ("Linking $(notdir $@)...")
msgcompile_objc ("Objective-C compiling $(subst ../,,$<) ...")

msgarchiving ("Archiving $(notdir $@)...")
msgresource ("Compiling resources $(subst ../,,$<) ...")

msglinking ("Linking $(notdir $@) ...")

msgarchiving ("Archiving $(notdir $@) ...")

messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" }

Expand All @@ -274,19 +274,19 @@ configuration { "x64", "Debug" }
if _OPTIONS["PROFILE"] then
targetsuffix "64dp"
end

configuration { "x32", "Release" }
targetsuffix ""
if _OPTIONS["PROFILE"] then
targetsuffix "p"
end

configuration { "x32", "Debug" }
targetsuffix "d"
if _OPTIONS["PROFILE"] then
targetsuffix "dp"
end

configuration { "Native", "Release" }
targetsuffix ""
if _OPTIONS["PROFILE"] then
Expand Down Expand Up @@ -389,7 +389,7 @@ configuration { }
}
configuration { }
end

-- define USE_SYSTEM_JPEGLIB if library shipped with MAME is not used
--ifneq ($(BUILD_JPEGLIB),1)
--DEFS += -DUSE_SYSTEM_JPEGLIB
Expand Down Expand Up @@ -472,7 +472,7 @@ end
if _OPTIONS["SYMBOLS"]~=nil then
flags {
"Symbols",
}
}
end

--# add the optimization flag
Expand All @@ -492,9 +492,9 @@ end
--ifneq ($(),0)
if _OPTIONS["OPTIMIZE"] then
buildoptions {
"-fno-strict-aliasing"
"-fno-strict-aliasing"
}
if _OPTIONS["ARCHOPTS"] then
if _OPTIONS["ARCHOPTS"] then
buildoptions {
_OPTIONS["ARCHOPTS"]
}
Expand Down Expand Up @@ -524,7 +524,7 @@ if _OPTIONS["MAP"] then
"-Wl,-Map," .. "../../../../" .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".map"
}

end
end
end
buildoptions {
"-Wno-unknown-pragmas",
Expand Down Expand Up @@ -565,7 +565,7 @@ end
--endif



local version = str_to_version(_OPTIONS["gcc_version"])
if string.find(_OPTIONS["gcc"], "clang") then
buildoptions {
Expand All @@ -578,7 +578,7 @@ end
buildoptions {
"-Wno-unused-value",
}
end
end
if (version >= 30400) then
buildoptions {
"-Wno-inline-new-delete",
Expand All @@ -597,12 +597,12 @@ end
buildoptions {
"-Wno-cast-align"
}
end
end
if (version >= 40400) then
buildoptions {
"-Wno-unused-result",
}
end
end

if (version >= 40700) then
buildoptions {
Expand All @@ -627,13 +627,13 @@ local subdir
if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"]
else
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] .. _OPTIONS["subtarget"]
end
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] .. _OPTIONS["subtarget"]
end

if not toolchain(MAME_BUILD_DIR, subdir) then
return -- no action specified
end

configuration { "asmjs" }
buildoptions {
"-std=gnu89",
Expand Down Expand Up @@ -688,12 +688,12 @@ configuration { "linux-*" }
"X11",
"Xinerama",
}
defines
defines
{
"DISTRO=" .. _OPTIONS["distro"] ,
}
if _OPTIONS["distro"]=="debian-stable" then
defines
defines
{
"NO_AFFINITY_NP",
}
Expand Down Expand Up @@ -833,7 +833,7 @@ configuration { "vs*" }
}
if _OPTIONS["vs"]=="intel-15" then
buildoptions {
"/Qwd9",
"/Qwd9",
"/Qwd82",
"/Qwd111",
"/Qwd128",
Expand All @@ -846,13 +846,13 @@ if _OPTIONS["vs"]=="intel-15" then
"/Qwd869",
"/Qwd2545",
"/Qwd2553",
"/Qwd2557",
"/Qwd3280",
"/Qwd2557",
"/Qwd3280",

"/Qwd170",
"/Qwd188",

"/Qwd63",
"/Qwd63",
"/Qwd177",
"/Qwd186",
"/Qwd488",
Expand Down Expand Up @@ -909,14 +909,14 @@ if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
startproject (_OPTIONS["target"])
else
startproject (_OPTIONS["target"] .. _OPTIONS["subtarget"])
end
end
mainProject(_OPTIONS["target"],_OPTIONS["subtarget"])

if _OPTIONS["with-tools"] then
group "tools"
dofile(path.join("src", "tools.lua"))
end

if (_ACTION == "gmake" and _OPTIONS["gcc"]=='asmjs') then
if (_ACTION == "gmake" and _OPTIONS["gcc"]=='asmjs') then
strip()
end
Loading