Created
June 24, 2016 06:10
-
-
Save waruqi/c7d6686d56d18cec9a21b4aee0d1eafb to your computer and use it in GitHub Desktop.
merge static library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- the debug mode | |
if is_mode("debug") then | |
-- enable the debug symbols | |
set_symbols("debug") | |
-- disable optimization | |
set_optimize("none") | |
end | |
-- the release mode | |
if is_mode("release") then | |
-- set the symbols visibility: hidden | |
set_symbols("hidden") | |
-- enable fastest optimization | |
set_optimize("fastest") | |
-- strip all symbols | |
set_strip("all") | |
end | |
-- add target | |
target("add") | |
-- set kind | |
set_kind("static") | |
-- add files | |
add_files("src/add.c") | |
-- add target | |
target("sub") | |
-- set kind | |
set_kind("static") | |
-- add files | |
add_files("src/sub.c") | |
-- add target | |
target("mul") | |
-- set kind | |
set_kind("static") | |
-- add deps | |
add_deps("add", "sub") | |
-- add files | |
add_files("src/mul.c") | |
add_files("build/libadd.a") | |
add_files("build/libsub.a") | |
-- add link directory | |
add_linkdirs("$(buildir)") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xmake: https://github.com/waruqi/xmake