switchted to self-made dependency generation

This commit is contained in:
Noah Swerhun 2021-12-26 00:19:38 -06:00
parent 04a58ffa04
commit 9368828db1

View file

@ -98,7 +98,14 @@ EOF
sed "s/${SRCDIR}\//${OBJDIR}\//" | sed "s/${SRCDIR}\//${OBJDIR}\//" |
sed "s/\.c$/.o/")" sed "s/\.c$/.o/")"
gcc -MM -MT "${objname}" "${srcname}" >> "${MAKEFILE}" includes="$(grep '#include ".*"' ${srcname} |
awk -F\" '{ print $2 }')"
printf "%s: %s " "${objname}" "${srcname}" >> "${MAKEFILE}"
for line in $includes; do
printf "%s " "${file%$(basename ${file})}${line}" >> "${MAKEFILE}"
done
printf "\n" >> "${MAKEFILE}"
printf "\t@%s object %s\n" \ printf "\t@%s object %s\n" \
'$(PROG_COMMAND)' "${objname}" >> "${MAKEFILE}" '$(PROG_COMMAND)' "${objname}" >> "${MAKEFILE}"