blob: 7b194df086127eb7b4347d08d600845a4019cf0b [file] [log] [blame]
builddir = $out
disabled = false
# Each compiler has enabled all the warnings it can.
# Here we make them errors, and disable a few we don't want bothering us.
warnings = -Werror $
-Wno-unknown-warning-option $
-Wno-poison-system-directories $
-Wno-double-promotion $
-Wno-float-equal $
-Wno-padded $
warnings_c = $warnings $
-Wno-declaration-after-statement $
warnings_cc = $warnings $
-Wno-c++98-compat-pedantic $
-Wno-gnu-anonymous-struct $
-Wno-old-style-cast $
rule compile_c
command = $disabled && touch $out || $cc -std=c11 -g -Os $warnings_c $cflags $extra_cflags $
$target_flags -MD -MF $out.d -c $in -o $out
depfile = $out.d
deps = gcc
description = compile $out
rule compile_cc
command = $disabled && touch $out || $cxx -std=c++11 -g -Os $warnings_cc $cflags $extra_cflags $
$target_flags -MD -MF $out.d -c $in -o $out
depfile = $out.d
deps = gcc
description = compile $out
rule link
command = $disabled && touch $out || $cxx $ldflags $extra_ldflags $in -ldl -o $out
description = link $out
include ninja/targets