Hi all,
I would like to realize the following:
How can I "automatically" prefix the current subdirectory in the included
Makefile relative to the "main" Makefile for all targets and source files?
directory tree:
Makefile
subdir_a/
Makefile
file.c
subdir_b/
subdir_c/
Makefile
file.c
Makefile
otherfile.c
When calling the "main" Makefile, the subdirectory-Makefiles get recursively
include'd into the mail Makefile and thus the targets from each sub-Makefile.
Problem here:
file.c will exist twice (and thus file.o as target) and the target rules might
miss the subdirectory-prefixes, so the build will not work properly.
Thanks.
Best regards,
Erik