Skip to content

Commit f6e3b0c

Browse files
committed
✨ feat: update build type
1 parent d07bbfb commit f6e3b0c

15 files changed

Lines changed: 83 additions & 31 deletions

File tree

apps/micropython/xmake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -22,7 +22,7 @@
2222
--
2323
add_rules("mode.debug", "mode.release")
2424

25-
add_requires("micropython", {configs = {shared = false}})
25+
add_requires("micropython")
2626

2727
target("micropython")
2828
do

apps/zlib/xmake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -23,7 +23,7 @@
2323

2424
add_rules("mode.debug", "mode.release")
2525

26-
add_requires("zlib", {configs = {shared = false}})
26+
add_requires("zlib")
2727

2828
target("zlib")
2929
do

repo/packages/f/ffmpeg/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2023-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -30,7 +30,11 @@ do
3030

3131
add_versions("5.1.2", "39a0bcc8d98549f16c570624678246a6ac736c066cebdb409f9502e915b22f2b")
3232

33-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
33+
add_configs("shared", {
34+
description = "Build shared library.",
35+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
36+
type = "boolean"
37+
})
3438

3539
on_install("cross@linux", function(package)
3640
import("rt.private.build.rtflags")

repo/packages/l/libffi/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -33,7 +33,11 @@ do
3333
add_patches("3.4.4", path.join(os.scriptdir(), "patches", "3.4.4", "01_src_tramp.diff"),
3434
"6a16954ca8c1b1549b2f0eae369b1abe11cdbb70e7d1e94c32f94defbae4bc60")
3535

36-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
36+
add_configs("shared", {
37+
description = "Build shared library.",
38+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
39+
type = "boolean"
40+
})
3741

3842
on_install("cross@linux", function(package)
3943
import("rt.private.build.rtflags")

repo/packages/l/libjpeg/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -33,7 +33,11 @@ do
3333
add_versions("v9d", "2303a6acfb6cc533e0e86e8a9d29f7e6079e118b9de3f96e07a71a11c082fa6a")
3434
add_versions("v9e", "4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d")
3535

36-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
36+
add_configs("shared", {
37+
description = "Build shared library.",
38+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
39+
type = "boolean"
40+
})
3741

3842
on_install("cross@linux", function(package)
3943
import("rt.private.build.rtflags")

repo/packages/l/libpng/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -36,7 +36,11 @@ do
3636
add_versions("v1.6.38", "e1ab4aae9b88329d34bd1ca47adf3fb06c10153dbb660f4c80e2673f9fa94b24")
3737
add_versions("v1.6.39", "eca1ea183643d0b35a764554ede4714cf5dbc30b66845630d81b995c3b2dd571")
3838

39-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
39+
add_configs("shared", {
40+
description = "Build shared library.",
41+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
42+
type = "boolean"
43+
})
4044

4145
on_load(function(package)
4246
package:add("deps", "zlib", {debug = package:config("debug"), configs = {shared = package:config("shared")}})

repo/packages/l/lua/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -32,7 +32,11 @@ do
3232
add_patches("5.1.4", path.join(os.scriptdir(), "patches", "5.1.4", "01_makefile.diff"),
3333
"ce22ca035ebc054876005aa252c2284266c1f34706b12f7219165dbcd5797e4b")
3434

35-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
35+
add_configs("shared", {
36+
description = "Build shared library.",
37+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
38+
type = "boolean"
39+
})
3640

3741
on_load(function(package)
3842
package:add("deps", "readline", {debug = package:config("debug"), configs = {shared = package:config("shared")}})

repo/packages/m/micropython/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2023-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -32,7 +32,11 @@ do
3232
add_patches("1.20.0", path.join(os.scriptdir(), "patches", "1.20.0", "01_adapt_smart.diff"),
3333
"d0eb05d02339977f9c5771dcc81d2a616962ec57cb4d272fe8da3b8b22cc830c")
3434

35-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
35+
add_configs("shared", {
36+
description = "Build shared library.",
37+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
38+
type = "boolean"
39+
})
3640
add_configs("with_ffi", {description = "use libffi library.", default = false, type = "boolean"})
3741

3842
on_load(function(package)

repo/packages/n/ncurses/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -32,7 +32,11 @@ do
3232

3333
add_versions("6.4", "6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159")
3434

35-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
35+
add_configs("shared", {
36+
description = "Build shared library.",
37+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
38+
type = "boolean"
39+
})
3640

3741
on_install("cross@linux", function(package)
3842
import("rt.private.build.rtflags")

repo/packages/o/openssl/xmake.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -41,7 +41,11 @@ do
4141
add_patches("1.1.1-i", path.join(os.scriptdir(), "patches", "1.1.1-i", "03_include_linux_version.diff"),
4242
"334e52ac96629e2c0e2c35b77bfa597a22fd10c7d3b1c5ed8ac95b7275505373")
4343

44-
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
44+
add_configs("shared", {
45+
description = "Build shared library.",
46+
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
47+
type = "boolean"
48+
})
4549

4650
on_install("cross@linux", function(package)
4751
import("rt.private.build.rtflags")

0 commit comments

Comments
 (0)