forked from mejibyte/proxydo
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
28 lines (24 loc) · 758 Bytes
/
Rakefile
File metadata and controls
28 lines (24 loc) · 758 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
task :default => [:compile]
task :clear do
puts "Removing build directory..."
system "rm -rf build"
puts "Done"
end
task :compile do
puts "Compiling..."
begin
Dir.mkdir "build"
rescue
puts "Apparently the build directory already exists. Maybe you want 'rake clear' first?"
raise
end
Dir.chdir "src"
system "g++ main.cpp config.cpp base64.cpp util.cpp IncomingProxy.cpp OutgoingProxy.cpp sockets/ClientSocket.cpp sockets/ServerSocket.cpp sockets/Socket.cpp -o ../build/proxydo -I/usr/local/include/yaml-cpp -L/usr/local/lib -lyaml-cpp"
puts "Everything compiled to /build"
Dir.chdir ".."
end
task :all do
Rake::Task["clear"].execute
Rake::Task["compile"].execute
system "cp config.yml.example build/config.yml"
end