Skip to content

Commit

Permalink
Update build.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
RealNeGate committed Jul 8, 2023
1 parent 080db36 commit 232f2f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ local options = {
-- Cuik/TB are broken down into several pieces
local modules = {
common = { srcs={"common/common.c", "common/perf.c"} },
cuik = { srcs={"libCuik/lib/libcuik.c", "libCuik/lib/toolchains/msvc.c", "libCuik/lib/toolchains/gnu.c", "libCuik/lib/toolchains/darwin.c"}, flags="-I libCuik/include" },
tb = { srcs={"tb/src/libtb.c", "tb/src/x64/x64.c"}, flags="-I tb/include -DCUIK_USE_TB" },
cuik = { srcs={"libCuik/lib/libcuik.c", "libCuik/lib/toolchains/msvc.c", "libCuik/lib/toolchains/gnu.c", "libCuik/lib/toolchains/darwin.c"}, flags="-I libCuik/include", deps={"common"} },
tb = { srcs={"tb/src/libtb.c", "tb/src/x64/x64.c"}, flags="-I tb/include -DCUIK_USE_TB", deps={"common"} },

-- executables:
-- Cuik command line
Expand Down Expand Up @@ -112,9 +112,15 @@ else
end

local is_exe = false
local added = {}

-- resolve dependencies
function walk(name)
if added[name] ~= nil then
return
end
added[name] = true

if options.shared and modules[name].is_exe then
print("error: "..name.." is an executable, it cannot be compiled with -shared")
exit(1)
Expand Down

0 comments on commit 232f2f1

Please sign in to comment.