commit e741a5d5156f49f7261f7d7331a2aadb8e50e6d3
parent 96a4b58a74f86d848e9a32f7dc35d9ead549f6c7
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 16 May 2018 20:45:36 +0100
Fix inclusion dependencies generation
.c dependencies do nothing.
Diffstat:
4 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/as/Makefile b/as/Makefile
@@ -27,32 +27,32 @@ include target/i386.mk
include target/z80.mk
#deps
-expr.c: ./../inc/scc.h
-expr.c: ./as.h
-ins.c: ./../inc/scc.h
-ins.c: ./as.h
-main.c: ./../inc/arg.h
-main.c: ./../inc/scc.h
-main.c: ./as.h
-myro.c: ./../inc/myro.h
-myro.c: ./../inc/scc.h
-myro.c: ./as.h
-parser.c: ./../inc/scc.h
-parser.c: ./as.h
-symbol.c: ./../inc/scc.h
-symbol.c: ./as.h
-target/x80/ins.c: target/x80/../../../inc/scc.h
-target/x80/ins.c: target/x80/../../as.h
-target/x80/ins.c: target/x80/proc.h
-target/x80/z80.c: target/x80/../../../inc/scc.h
-target/x80/z80.c: target/x80/../../as.h
-target/x80/z80.c: target/x80/../x80/proc.h
-target/x86/amd64.c: target/x86/../../../inc/scc.h
-target/x86/amd64.c: target/x86/../../as.h
-target/x86/i386.c: target/x86/../../../inc/scc.h
-target/x86/i386.c: target/x86/../../as.h
-target/x86/i386.c: target/x86/../x86/proc.h
-target/x86/i8086.c: target/x86/arch16.h
-target/x86/ins.c: target/x86/../../../inc/scc.h
-target/x86/ins.c: target/x86/../../as.h
-target/x86/ins.c: target/x86/proc.h
+expr.o: ./../inc/scc.h
+expr.o: ./as.h
+ins.o: ./../inc/scc.h
+ins.o: ./as.h
+main.o: ./../inc/arg.h
+main.o: ./../inc/scc.h
+main.o: ./as.h
+myro.o: ./../inc/myro.h
+myro.o: ./../inc/scc.h
+myro.o: ./as.h
+parser.o: ./../inc/scc.h
+parser.o: ./as.h
+symbol.o: ./../inc/scc.h
+symbol.o: ./as.h
+target/x80/ins.o: ./target/x80/../../../inc/scc.h
+target/x80/ins.o: ./target/x80/../../as.h
+target/x80/ins.o: ./target/x80/proc.h
+target/x80/z80.o: ./target/x80/../../../inc/scc.h
+target/x80/z80.o: ./target/x80/../../as.h
+target/x80/z80.o: ./target/x80/../x80/proc.h
+target/x86/amd64.o: ./target/x86/../../../inc/scc.h
+target/x86/amd64.o: ./target/x86/../../as.h
+target/x86/i386.o: ./target/x86/../../../inc/scc.h
+target/x86/i386.o: ./target/x86/../../as.h
+target/x86/i386.o: ./target/x86/../x86/proc.h
+target/x86/i8086.o: ./target/x86/arch16.h
+target/x86/ins.o: ./target/x86/../../../inc/scc.h
+target/x86/ins.o: ./target/x86/../../as.h
+target/x86/ins.o: ./target/x86/proc.h
diff --git a/ld/Makefile b/ld/Makefile
@@ -21,15 +21,15 @@ clean:
distclean: clean
#deps
-coff32.c: ./../inc/coff32/filehdr.h
-coff32.c: ./../inc/coff32/scnhdr.h
-coff32.c: ./../inc/coff32/syms.h
-coff32.c: ./../inc/scc.h
-coff32.c: ./ld.h
-formats.c: ./ld.h
-main.c: ./../inc/ar.h
-main.c: ./../inc/scc.h
-main.c: ./../inc/syslibs.h
-main.c: ./ld.h
-obj.c: ./../inc/scc.h
-obj.c: ./ld.h
+coff32.o: ./../inc/coff32/filehdr.h
+coff32.o: ./../inc/coff32/scnhdr.h
+coff32.o: ./../inc/coff32/syms.h
+coff32.o: ./../inc/scc.h
+coff32.o: ./ld.h
+formats.o: ./ld.h
+main.o: ./../inc/ar.h
+main.o: ./../inc/scc.h
+main.o: ./../inc/syslibs.h
+main.o: ./ld.h
+obj.o: ./../inc/scc.h
+obj.o: ./ld.h
diff --git a/mkdep.sh b/mkdep.sh
@@ -6,8 +6,8 @@ trap "rm -f $$.tmp" 0 2 3
(sed '/^#deps/q' Makefile
for i in `find . -name '*.c'`
do
- file=${i#./}
- dir=`dirname $i | sed -e 's,/*$,,' -e 's,\./,,'`
+ file=`echo $i | sed -e 's,^./,,' -e 's/\.c$/.o/'`
+ dir=`dirname $i | sed 's,/*$,,'`
sed -n '/#include "/ s,#include "\(.*\)",'"$file: $dir"'/\1,p' $i
done |
sort) > $$.tmp && mv $$.tmp Makefile
diff --git a/nm/Makefile b/nm/Makefile
@@ -21,13 +21,13 @@ clean:
distclean: clean
#deps
-coff32.c: ./../inc/coff32/filehdr.h
-coff32.c: ./../inc/coff32/scnhdr.h
-coff32.c: ./../inc/coff32/syms.h
-coff32.c: ./../inc/scc.h
-coff32.c: ./nm.h
-formats.c: ./nm.h
-main.c: ./../inc/ar.h
-main.c: ./../inc/arg.h
-main.c: ./../inc/scc.h
-main.c: ./nm.h
+coff32.o: ./../inc/coff32/filehdr.h
+coff32.o: ./../inc/coff32/scnhdr.h
+coff32.o: ./../inc/coff32/syms.h
+coff32.o: ./../inc/scc.h
+coff32.o: ./nm.h
+formats.o: ./nm.h
+main.o: ./../inc/ar.h
+main.o: ./../inc/arg.h
+main.o: ./../inc/scc.h
+main.o: ./nm.h