-
Notifications
You must be signed in to change notification settings - Fork 36
/
macos.ninja
157 lines (157 loc) · 7 KB
/
macos.ninja
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
ninja_required_version = 1.7
builddir = build/macos
bin = $builddir/bin
obj = $builddir/obj
cc = clang
ar = ar
luamake = luamake
rule c_source_bee
command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-fvisibility=hidden -mmacosx-version-min=10.15 -Itools/lua54 -DNDEBUG $
-Wunguarded-availability -o $out -c $in
description = Compile C $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua-seri.obj: c_source_bee $
bee.lua/3rd/lua-seri/lua-seri.c
rule cxx_source_bee
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-fvisibility=hidden -mmacosx-version-min=10.15 -DNDEBUG $
-Wunguarded-availability -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
rule cxx_source_bee_1
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua -DNDEBUG $
-Wunguarded-availability -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/error.obj: cxx_source_bee_1 bee.lua/bee/error.cpp
build $obj/source_bee/filewatch_osx.obj: cxx_source_bee_1 $
bee.lua/bee/filewatch/filewatch_osx.cpp
build $obj/source_bee/endpoint.obj: cxx_source_bee_1 $
bee.lua/bee/net/endpoint.cpp
build $obj/source_bee/socket.obj: cxx_source_bee_1 bee.lua/bee/net/socket.cpp
build $obj/source_bee/version.obj: cxx_source_bee_1 $
bee.lua/bee/platform/version.cpp
build $obj/source_bee/process_select.obj: cxx_source_bee_1 $
bee.lua/bee/subprocess/process_select.cpp
build $obj/source_bee/subprocess_posix.obj: cxx_source_bee_1 $
bee.lua/bee/subprocess/subprocess_posix.cpp
build $obj/source_bee/atomic_semaphore.obj: cxx_source_bee_1 $
bee.lua/bee/thread/atomic_semaphore.cpp
build $obj/source_bee/setname.obj: cxx_source_bee_1 $
bee.lua/bee/thread/setname.cpp
build $obj/source_bee/simplethread_posix.obj: cxx_source_bee_1 $
bee.lua/bee/thread/simplethread_posix.cpp
build $obj/source_bee/spinlock.obj: cxx_source_bee_1 $
bee.lua/bee/thread/spinlock.cpp
build $obj/source_bee/file_handle.obj: cxx_source_bee_1 $
bee.lua/bee/utility/file_handle.cpp
build $obj/source_bee/file_handle_osx.obj: cxx_source_bee_1 $
bee.lua/bee/utility/file_handle_osx.cpp
build $obj/source_bee/file_handle_posix.obj: cxx_source_bee_1 $
bee.lua/bee/utility/file_handle_posix.cpp
build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
bee.lua/bee/utility/path_helper.cpp
rule cxx_source_bee_2
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua -Itools/lua54 $
-DBEE_STATIC -DNDEBUG -Wunguarded-availability -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua_filesystem.obj: cxx_source_bee_2 $
bee.lua/binding/lua_filesystem.cpp
build $obj/source_bee/lua_filewatch.obj: cxx_source_bee_2 $
bee.lua/binding/lua_filewatch.cpp
build $obj/source_bee/lua_platform.obj: cxx_source_bee_2 $
bee.lua/binding/lua_platform.cpp
build $obj/source_bee/lua_select.obj: cxx_source_bee_2 $
bee.lua/binding/lua_select.cpp
build $obj/source_bee/lua_serialization.obj: cxx_source_bee_2 $
bee.lua/binding/lua_serialization.cpp
build $obj/source_bee/lua_socket.obj: cxx_source_bee_2 $
bee.lua/binding/lua_socket.cpp
build $obj/source_bee/lua_subprocess.obj: cxx_source_bee_2 $
bee.lua/binding/lua_subprocess.cpp
build $obj/source_bee/lua_thread.obj: cxx_source_bee_2 $
bee.lua/binding/lua_thread.cpp
build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
bee.lua/binding/lua_time.cpp
rule c_source_lua
command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-fvisibility=hidden -mmacosx-version-min=10.15 -DNDEBUG $
-Wunguarded-availability -o $out -c $in
description = Compile C $out
deps = gcc
depfile = $out.d
build $obj/source_lua/utf8_crt.obj: c_source_lua bee.lua/3rd/lua/utf8_crt.c
rule c_source_lua_1
command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-mmacosx-version-min=10.15 -DMAKE_LIB -DLUA_USE_MACOSX -DNDEBUG $
-Wunguarded-availability -o $out -c $in
description = Compile C $out
deps = gcc
depfile = $out.d
build $obj/source_lua/linit.obj: c_source_lua_1 bee.lua/3rd/lua/linit.c
build $obj/source_lua/onelua.obj: c_source_lua_1 bee.lua/3rd/lua/onelua.c
rule cxx_source_bootstrap
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua/3rd/lua $
-Ibee.lua -DLUA_USE_MACOSX -DNDEBUG -Wunguarded-availability -o $out -c $
$in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
rule link_bootstrap
command = $cc $in -o $out -lm -ldl -framework Foundation -framework $
CoreFoundation -framework CoreServices -lstdc++ -Wl,-S,-x
description = Link Exe $out
rule copy
command = ditto $in$input $out 1>/dev/null
description = Copy $in$input $out
restat = 1
rule test
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
$obj/source_bee/lua-seri.obj $obj/source_bee/format.obj $
$obj/source_bee/error.obj $obj/source_bee/filewatch_osx.obj $
$obj/source_bee/endpoint.obj $obj/source_bee/socket.obj $
$obj/source_bee/version.obj $obj/source_bee/process_select.obj $
$obj/source_bee/subprocess_posix.obj $
$obj/source_bee/atomic_semaphore.obj $obj/source_bee/setname.obj $
$obj/source_bee/simplethread_posix.obj $obj/source_bee/spinlock.obj $
$obj/source_bee/file_handle.obj $obj/source_bee/file_handle_osx.obj $
$obj/source_bee/file_handle_posix.obj $obj/source_bee/path_helper.obj $
$obj/source_bee/lua_filesystem.obj $obj/source_bee/lua_filewatch.obj $
$obj/source_bee/lua_platform.obj $obj/source_bee/lua_select.obj $
$obj/source_bee/lua_serialization.obj $obj/source_bee/lua_socket.obj $
$obj/source_bee/lua_subprocess.obj $obj/source_bee/lua_thread.obj $
$obj/source_bee/lua_time.obj $obj/source_lua/utf8_crt.obj $
$obj/source_lua/linit.obj $obj/source_lua/onelua.obj
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
build $obj/test.stamp: test bee.lua/test/glibc-version.lua $
bee.lua/test/ltest.lua bee.lua/test/shell.lua $
bee.lua/test/supported.lua bee.lua/test/test.lua $
bee.lua/test/test_filesystem.lua bee.lua/test/test_filewatch.lua $
bee.lua/test/test_lua.lua bee.lua/test/test_serialization.lua $
bee.lua/test/test_socket.lua bee.lua/test/test_subprocess.lua $
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $
$bin/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
build copy_script: phony $bin/main.lua
build test: phony $obj/test.stamp
build copy_luamake: phony luamake
build notest: phony copy_luamake
default test notest