-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ninja
48 lines (40 loc) · 1.58 KB
/
build.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
ninja_required_version = 1.10
root = .
target = BlastOff
bdir = $root/build
builddir = $root/build/ninja
sdir = $root/src
sensorsdir = $sdir/sensors
guidir = $sdir/gui
fmt_hdr = /mnt/d/code/.ccconfig/usr/local/include
fmt_lib = /mnt/d/code/.ccconfig/usr/local/lib
project_hdr = $sdir/include
cxx = /usr/bin/clang++-10
cxx_flags = -std=c++17 -Wall $$(pkg-config --cflags gtk+-3.0) -I $fmt_hdr $
-I $project_hdr
ld_flags = $cxx_flags -Bstatic -L $fmt_lib $$(pkg-config --libs gtk+-3.0)
libs = -lfmt
rule cxx
command = $cxx -MMD -MT $out -MF $out.d $cxx_flags -c $in -o $out
description = CXX $out
depfile = $out.d
deps = gcc
rule link
command = $cxx $ld_flags -o $out $in $libs
description = LINK $out
build $bdir/main.o: cxx $sdir/main.cc
build $bdir/clock.o: cxx $guidir/clock.cc
### sensors ###
build $bdir/thrust_meter.o: cxx $sensorsdir/thrust_meter.cc
build $bdir/altimeter.o: cxx $sensorsdir/altimeter.cc
build $bdir/barometer.o: cxx $sensorsdir/barometer.cc
build $bdir/thermometer.o: cxx $sensorsdir/thermometer.cc
build $bdir/velocimeter.o: cxx $sensorsdir/velocimeter.cc
### gui ###
build $bdir/time_handle.o: cxx $guidir/time_handle.cc
build $bdir/draw_thrust_area.o: cxx $guidir/draw_thrust_area.cc
build $bdir/draw_vel_area.o: cxx $guidir/draw_vel_area.cc
build $bdir/draw_pres_area.o: cxx $guidir/draw_pres_area.cc
build $bdir/$target: link $bdir/main.o $bdir/clock.o $
$bdir/thrust_meter.o $bdir/altimeter.o $bdir/barometer.o $bdir/thermometer.o $bdir/velocimeter.o $
$bdir/time_handle.o $bdir/draw_thrust_area.o $bdir/draw_vel_area.o $bdir/draw_pres_area.o