-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
58 lines (40 loc) · 1.15 KB
/
xmake.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
set_xmakever("2.5.6")
set_project("ABAutoEnc")
set_version("0.2.0", {build = "%Y%m%d%H%M"})
add_rules("mode.minsizerel", "mode.debug")
set_defaultplat("mingw")
set_defaultarchs("i386")
set_allowedplats("windows", "mingw")
set_allowedarchs("x86", "i386")
if is_plat("mingw") then
add_requires("openssl") -- libressl does not support mingw on XMake
else
add_requires("libressl")
end
target("ABAutoEnc")
set_kind("shared")
set_optimize("smallest")
if is_plat("mingw") then
add_shflags("-static-libgcc", { force = true })
else
add_cxflags("-GS-", "-MT", { force = true })
end
add_links("kernel32", "user32", "ntdll")
if is_plat("mingw") then
add_packages("openssl")
else
add_packages("libressl")
end
add_files("src/dll/**.c")
if is_plat("mingw") then
add_shflags("src/dll/proxy/exports.def", { force = true })
else
add_files("src/dll/proxy/exports.def")
end
target("injector")
set_kind("binary")
set_optimize("smallest")
if is_plat("mingw") then
add_ldflags("-static-libgcc", { force = true })
end
add_files("src/injector/**.c")