-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.rb
More file actions
executable file
·45 lines (36 loc) · 838 Bytes
/
Copy pathmake.rb
File metadata and controls
executable file
·45 lines (36 loc) · 838 Bytes
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
#!/usr/bin/env ruby
require 'beaver'
require 'fileutils'
require 'colorize'
project = Project.new("Argon", build_dir: "out")
project.set_configs("Debug", "Release")
project.c_configs = {
"Debug" => C::Configuration.new(cflags: ["-g"]),
"Release" => C::Configuration.new(cflags: ["-O3"])
}
C::Library.new(
name: "Argon",
sources: "src/**/*.c",
include: ["deps/olive.c", "include"]
)
C::Library.pkg_config("sdl2")
C::Executable.new(
name: "test",
sources: ["test.c"],
dependencies: ["sdl2", "Argon"]
)
# Generate documentation
cmd :docs do
_sh %(rm -rf docs/html)
_sh %(rm -rf docs/latex)
Dir.chdir("docs") do
sh %(doxygen argon.doxygen)
end
end
cmd :clean do
sh %(rm -rf .beaver)
sh %(rm -rf #{project.build_dir})
sh %(rm -rf docs/html)
sh %(rm -rf docs/latex)
end
$beaver.default_command = ""