aboutsummaryrefslogtreecommitdiff
path: root/build.ninja
blob: 3d31c08350d60368642d184be6c3fbf67f6caf0d (plain) (blame)
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
cc       = clang++
cxxflags = -Weverything -Wno-c++98-compat -std=c++20
ldflags  = -lssl -lcrypto
out_dir  = out
name     = maple
src_dir  = $name

rule compile
  command = $cc $cxxflags -c $in -o $out

rule link
  command = $cc $ldflags $in -o $out

rule clang_format
  command = clang-format -i -style=LLVM $src_dir/*$cc_ext $src_dir/*.hh

build $out_dir/$name.o:  compile $src_dir/$name.cc
build $out_dir/gemini.o: compile $src_dir/gemini.cc
build $out_dir/titan.o:  compile $src_dir/titan.cc

build $out_dir/$name: link $out_dir/$name.o $out_dir/gemini.o $out_dir/titan.o

build _format: clang_format
build format:  phony _format

default $out_dir/$name