I have a project that I would like to convert from recursive to non recursive make. The structure looks like the following
+--app
| +-- Makefile
+--lib1
| +-- Makefile
| +-- x.c
| +-- y.c
|
+--lib2
| +-- Makefile
| +-- x.c
What I am trying to do is after a build is have a structure like this
+--app
| +-- build/
| | +-- debug(or release or test)/
| | | +-- lib1/
| | | | +-- *.o
| | | | +-- *.d
| | | +-- lib2/
| | | | +-- *.o
| | | | +-- *.d
| |
| +-- target/
| | +-- main.bin
| |
| +-- Makefile
|
+--lib1
| +-- module.mk
| +-- x.c
| +-- y.c
|
+--lib2
| +-- module.mk
| +-- x.c
The main idea is that the build folder contains all object and dependency files and and target has the program file that should be loaded.
The issue that I am having is that make will never want to create this structure. When I define my rules make will only run implicit rules and not my defined rules.
I have read every resource on non-recursive make and right now it just has not clicked yet. Any help is much appreciated.