I have a source tree:
/bootloader
/firmware
/system
and want to manage two separate builds for firmware and bootloader, each of them using common system sources but compiles them differently (i.e. with its own set of options).
Builds must be out-of-tree. Obvious "repository" feature of makepp is not a solution here, because it breaks this principle. Symbolic links are not solution too, because it must work on Windows.
The problem actually is in shared system sources, whose relative path structure differs from others, causing common pattern rules not work for them:
BUILD_PATH = $(relative_to $(PROJECT_PATH), .)/BUILD/$(relative_to ., $(PROJECT_PATH)) # trick to be able to extend rules for specific files at different subtree levels (if we use Makeppfile for each level)
...
$(BUILD_PATH)/%.o : %.c
...
Approach with single RootMakeppfile and include *.mk files (instead loading them) also doesn't allow me to do something like that:
$(BUILD_ROOT_PATH)/*/%.o : %.c
I've tried a lot of totally different approaches. It's not such trivial, as it seems to be at first glance. Please, help.