blob: b0e0dc9d4367f82c7661f68629c2caf7d5d4efb1 (
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
27
|
cc = clang++
# -DNO_CXX_20 -DNO_CXX_17
cxxflags = -Ofast -std=c++20 -Weverything -Wno-c++98-compat
out_dir = out
name = ellipse
src_dir = $name
out_ext = .exe
rule clang_format
command = clang-format -i $src_dir/*.cc $src_dir/*.hh
rule compile
command = $cc $cxxflags -c $in -o $out
rule link
command = $cc $in -o $out
build _format: clang_format
build format: phony _format
build $out_dir/$name.o: compile $src_dir/$name.cc
build $out_dir/test.o: compile $src_dir/test.cc
build $out_dir/$name$out_ext: link $out_dir/$name.o $out_dir/test.o | format
default $out_dir/$name$out_ext
|