mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
The last commit was a bandaid, but this needed a real fix. Now we create a .parse_deps.phony file in every module build dir that implicitly depends on that module's dependencies' .parse_deps.phony files, as well as order-only depends on any cog-parsed output for that module. This causes the cog files to get generated first if they never have been, but still leaves real header dependency tracking to clang's depfile generation.
79 lines
2.0 KiB
Plaintext
79 lines
2.0 KiB
Plaintext
# This file is automatically generated by bonnibel
|
|
|
|
rule compile_c
|
|
command = $cc -MMD -MF $out.d $cflags $ccflags -o $out -c $in
|
|
description = Compiling $name
|
|
depfile = $out.d
|
|
deps = gcc
|
|
|
|
rule dump_c_defs
|
|
command = echo | $cc $ccflags $cflags -dM -E - > $out
|
|
description = Dumping C defines for $target
|
|
|
|
rule dump_c_run
|
|
command = echo '#!/bin/bash' > $out; echo '$cc $ccflags $cflags $$*' >> $
|
|
$out; chmod a+x $out
|
|
description = Dumping C arguments for $target
|
|
|
|
rule compile_cxx
|
|
command = $cxx -MMD -MF $out.d $cxxflags $ccflags -o $out -c $in
|
|
description = Compiling $name
|
|
depfile = $out.d
|
|
deps = gcc
|
|
|
|
rule dump_cpp_defs
|
|
command = echo | $cxx -x c++ $ccflags $cxxflags -dM -E - > $out
|
|
description = Dumping C++ defines for $target
|
|
|
|
rule dump_cpp_run
|
|
command = echo '#!/bin/bash' > $out; echo '$cxx $ccflags $cxxflags $$*' $
|
|
>> $out; chmod a+x $out
|
|
description = Dumping C++ arguments for $target
|
|
|
|
rule compile_asm
|
|
command = $nasm -o $out -felf64 -MD $out.d $asflags $in
|
|
description = Assembling $name
|
|
depfile = $out.d
|
|
deps = gcc
|
|
|
|
rule parse_cog
|
|
command = $cog -o $out -d $cogflags $in
|
|
description = Parsing $name
|
|
|
|
rule exe
|
|
command = $ld $ldflags -o $out $in $libs
|
|
description = Linking $name
|
|
|
|
rule lib
|
|
command = $ar qcs $out $in
|
|
description = Archiving $name
|
|
|
|
rule cp
|
|
command = cp $in $out
|
|
description = Copying $name
|
|
|
|
rule dump
|
|
command = objdump -DSC -M intel $in > $out
|
|
description = Dumping decompiled $name
|
|
|
|
rule makest
|
|
description = Making symbol table
|
|
command = nm -n -S --demangle $in | ${source_root}/scripts/build_symbol_table.py $out
|
|
|
|
rule makefat
|
|
description = Creating $name
|
|
command = $
|
|
cp $in $out; $
|
|
mcopy -s -D o -i $out@@1M ${build_root}/fatroot/* ::/
|
|
|
|
rule strip
|
|
description = Stripping $name
|
|
command = $
|
|
cp $in $out; $
|
|
objcopy --only-keep-debug $out $debug; $
|
|
strip -g $out; $
|
|
objcopy --add-gnu-debuglink=$debug $out
|
|
|
|
rule touch
|
|
command = touch $out
|