diff --git a/build.lua b/build.lua index db22649..d1aff88 100755 --- a/build.lua +++ b/build.lua @@ -1,7 +1,5 @@ #!/usr/bin/env lua -- i love build scripts i love build scripts i love build scripts scripts build love i script build love me i love script build i script love build -local args = {...} - local isBlendi = os.getenv("USER") == "blendi" local separator = package.config:sub(1,1) @@ -30,7 +28,7 @@ local function fixPath(path) return new end -if args[1] == "clean" then +if arg[1] == "clean" then if separator == '\\' then runCommand("rmdir /s /q build 2>nul") else @@ -98,7 +96,7 @@ for i = 1,#files do if needsRebuild(fname, out) then needsLinking = true - runCommand('clang -c -o ' .. out .. ' ' .. fname .. ' ' .. table.concat(coolArgs, ' ')) + runCommand('clang -g -c -o ' .. out .. ' ' .. fname .. ' ' .. table.concat(coolArgs, ' ')) end objects[#objects+1] = out; @@ -107,9 +105,9 @@ end local exe = separator == '\\' and ".\\noom.exe" or "./noom" if needsLinking then - runCommand('clang -o ' .. exe .. ' ' .. table.concat(objects, ' ') .. ' ' .. table.concat(coolArgs, ' ')) + runCommand('clang -g -o ' .. exe .. ' ' .. table.concat(objects, ' ') .. ' ' .. table.concat(coolArgs, ' ')) end -if args[1] == "run" then +if arg[1] == "run" then runCommand(exe) end