diff options
Diffstat (limited to 'Documentation/EDID/Makefile')
-rw-r--r-- | Documentation/EDID/Makefile | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Documentation/EDID/Makefile b/Documentation/EDID/Makefile index 17763ca3f12b..85a927dfab02 100644 --- a/Documentation/EDID/Makefile +++ b/Documentation/EDID/Makefile @@ -15,10 +15,21 @@ clean: %.o: %.S @cc -c $^ -%.bin: %.o +%.bin.nocrc: %.o @objcopy -Obinary $^ $@ -%.bin.ihex: %.o +%.crc: %.bin.nocrc + @list=$$(for i in `seq 1 127`; do head -c$$i $^ | tail -c1 \ + | hexdump -v -e '/1 "%02X+"'; done); \ + echo "ibase=16;100-($${list%?})%100" | bc >$@ + +%.p: %.crc %.S + @cc -c -DCRC="$$(cat $*.crc)" -o $@ $*.S + +%.bin: %.p + @objcopy -Obinary $^ $@ + +%.bin.ihex: %.p @objcopy -Oihex $^ $@ @dos2unix $@ 2>/dev/null |