package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
1.0 KiB

add_rules("mode.release", "mode.debug")
option("gmp", {default = false, defines = "WITH_GMP"})
if has_config("gmp") then
add_requires("gmp")
end
target("libs7") do
set_kind("$(kind)")
set_basename("s7")
add_files("s7.c")
add_headerfiles("s7.h")
add_includedirs(".", {public = true})
add_options("gmp")
if is_plat("windows") then
set_languages("c11")
end
add_packages("gmp")
if is_mode("debug") then
add_defines("S7_DEBUGGING")
end
end
target("s7") do
set_kind("binary")
add_defines("WITH_MAIN")
add_files("s7.c")
add_headerfiles("s7.h")
add_includedirs(".", {public = true})
add_options("gmp")
if is_plat("windows") then
set_languages("c11")
end
add_packages("gmp")
if is_mode("debug") then
add_defines("S7_DEBUGGING")
end
if not is_plat("macosx") then
add_ldflags("-static", "-static-libgcc", {force = true})
end
if is_plat("linux") then
add_syslinks("pthread", "dl")
end
end