# Define a basic set of rules
rule cxx-build
  command = $cxx -MMD -MF $out.d $cxxflags -c $in -o $out
  description = CXX - $in
  depfile = $out.d

rule link-executable
  command = $cxx $ldflags $in -o $out
  description = LINK - $out

rule static-lib
  command = $ar rcs $out $in
  description = AR - $out


Fix build on GNU ld versions that require strict left-to-right link ordering
# Define a basic set of rules
rule cxx-build
  command = $cxx -MMD -MF $out.d $cxxflags -c $in -o $out
  description = CXX - $in
  depfile = $out.d

rule link-executable
  command = $cxx $in -o $out $ldflags
  description = LINK - $out

rule static-lib
  command = $ar rcs $out $in
  description = AR - $out