I want to create a Makefile system in my project directories so that rules defined in one are defined in others. Say, for example, I have a directory called "test" and inside "test.c", but I want to build test.c using the rule defined in the Makefile in the root directory
Here is an example
#Makefile (inside base dir) %.o: %.c gcc -Wall -c $^ all: make -C test out.a
Notice how it calls cc instead of my rule using gcc defined in the root makefile.
In general, I do not want to define the same rule in every makefile
source share