The tree of my work folder:
.
|-- work_folder1
| |-- some.c file
| |-- Makefile B
|
|-- some.c file
|-- Makefile A
My makefile A call 'all' rule in Makefile B. The 'all' rule of Makefile B makes one .o file named 'B.o' [$(NAME) variable] and copy it on work folder (cp ../). The Makefile A compile .c file and link them with the 'B.o'. But if i decide to change the name of 'B.o' in Makefile B, for example 'my_B.o', Makefile A cannot compile cause 'B.o' dosen't exist anymore.
How can I, from Makefile A, read the $(NAME) variable of Makefile B?