shithub: scc

Download patch

ref: 13bb65b0a913612763d1066aa60d5513d451f296
parent: 30d5a2c869c5f47cca98fdedb9024d462c6b9191
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Dec 12 02:53:03 EST 2017

[lib/c] Fix dependencies generation

There were several paths that were wrong.

--- a/lib/c/target/amd64-sysv-linux-elf/Makefile
+++ b/lib/c/target/amd64-sysv-linux-elf/Makefile
@@ -3,3 +3,5 @@
 include ../../../../config.mk
 include ../objlst.mk
 include ../common.mk
+
+SCC_CFLAGS = -I../../include -I../../include/bits/amd64-sysv/
--- a/lib/c/target/amd64-sysv-linux-elf/gendep.sh
+++ b/lib/c/target/amd64-sysv-linux-elf/gendep.sh
@@ -9,8 +9,8 @@
 for i
 do
 	cat <<EOF
-$i: ../${i%.o}.c
-	\$(CC) \$(TF_CFLAGS) ../${i%.o}.c -c
+$i: ../../${i%.o}.c
+	\$(CC) \$(TF_CFLAGS) ../../${i%.o}.c -c
 
 EOF
 done) > $$.mk && mv $$.mk makefile
--- a/lib/c/target/amd64-sysv-openbsd-elf/gendep.sh
+++ b/lib/c/target/amd64-sysv-openbsd-elf/gendep.sh
@@ -9,8 +9,8 @@
 for i
 do
 	cat <<EOF
-$i: ../${i%.o}.c
-	\$(CC) \$(TF_CFLAGS) ../${i%.o}.c -c
+$i: ../../${i%.o}.c
+	\$(CC) \$(TF_CFLAGS) ../../${i%.o}.c -c
 
 EOF
 done) > $$.mk && mv $$.mk makefile
--- a/lib/c/target/common.mk
+++ b/lib/c/target/common.mk
@@ -6,7 +6,7 @@
 	ranlib $@
 
 dep:
-	gendep.sh
+	gendep.sh $(OBJ)
 
 clean:
 	rm -f *.o
--- a/lib/c/target/i386-sysv-linux-elf/gendep.sh
+++ b/lib/c/target/i386-sysv-linux-elf/gendep.sh
@@ -9,8 +9,8 @@
 for i
 do
 	cat <<EOF
-$i: ../${i%.o}.c
-	\$(CC) \$(TF_CFLAGS) ../${i%.o}.c -c
+$i: ../../${i%.o}.c
+	\$(CC) \$(TF_CFLAGS) ../../${i%.o}.c -c
 
 EOF
 done) > $$.mk && mv $$.mk makefile
--- a/lib/c/target/z80-scc-none-none/gendep.sh
+++ b/lib/c/target/z80-scc-none-none/gendep.sh
@@ -9,8 +9,8 @@
 for i
 do
 	cat <<EOF
-$i: ../${i%.o}.c
-	\$(CC) \$(TF_CFLAGS) ../${i%.o}.c -c
+$i: ../../${i%.o}.c
+	\$(CC) \$(TF_CFLAGS) ../../${i%.o}.c -c
 
 EOF
 done) > $$.mk && mv $$.mk makefile