summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2017-08-14 18:19:48 +0800
committerruki <[email protected]>2017-08-14 18:19:48 +0800
commitb9a0e818560c31e7638263df96f26d8a191f2e30 (patch)
tree20898f7797671e8369dc17b13e2af8ae38abf4a6 /core/src
parent18e041e57463c847158f3c3d67e7e75e22b082f9 (diff)
modify linkflags order
Diffstat (limited to 'core/src')
-rw-r--r--core/src/demo/xmake.lua24
-rw-r--r--core/src/xmake/xmake.lua2
2 files changed, 12 insertions, 14 deletions
diff --git a/core/src/demo/xmake.lua b/core/src/demo/xmake.lua
index e7fd6cbc9..2bf163753 100644
--- a/core/src/demo/xmake.lua
+++ b/core/src/demo/xmake.lua
@@ -19,24 +19,22 @@ target("demo")
-- add includes directory
add_includedirs("$(projectdir)", "$(projectdir)/src", "$(buildir)/luajit")
- -- link readline
- if not is_plat("windows") then
--- add_links("readline")
- end
-
- -- add packages
- add_packages("tbox", "base")
-
-- add the common source files
add_files("**.c")
- -- for macosx
- if is_plat("macosx") then
- add_ldflags("-all_load", "-pagezero_size 10000", "-image_base 100000000")
- end
-
-- add the resource files (it will be enabled after publishing new version)
if is_plat("windows") then
add_files("*.rc")
end
+
+ -- add links
+ if is_plat("windows") then
+ add_links("ws2_32", "advapi32")
+ elseif is_plat("android") then
+ add_links("m", "c")
+ elseif is_plat("macosx") then
+ add_ldflags("-all_load", "-pagezero_size 10000", "-image_base 100000000")
+ else
+ add_links("pthread", "dl", "m", "c")
+ end
diff --git a/core/src/xmake/xmake.lua b/core/src/xmake/xmake.lua
index b22712136..6ad45560b 100644
--- a/core/src/xmake/xmake.lua
+++ b/core/src/xmake/xmake.lua
@@ -20,7 +20,7 @@ target("xmake")
add_includedirs("$(projectdir)", "$(buildir)/luajit")
-- add packages
- add_packages("tbox", "base")
+ add_packages("tbox")
-- add the common source files
add_files("**.c")