Question about Ambiq example make files

I have a project (Apollo 3) that was based upon one of the Ambiq examples. I have an issue with the makefile for the project. What I see is that Make removes all the dependency files after each build, this means that if only a header file is changed the project is not rebuilt.

Removing generated files is how Make is designed to work. How can I update my makefile to NOT remove those .d files?

Sid

I found 2 posts that basically mention the same solution (one thread mentions using ‘secondary’ instead)

https://unix.stackexchange.com/question … iate-files

https://stackoverflow.com/questions/474 … iate-files

They both have references to this link https://www.gnu.org/software/make/manua … Rules.html

Hope this helps!

Thank you.

Sid