Hi all,
to gain some benefits I convert our Makefiles from recursion to non-recursion
and using the various "Recursive Make considered harmful" or "Recursive Make
reloaded" papers on the net.
So far this worked out quite nicely, however I have trouble with multiple
executables per directory. I would either like an implicit rule, in the form:
$($(X_MODULE)_OUTPUT)/%: %.o $(DEPS)
@echo ' LINK EXEC $@'
$(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -o '$@' $^ $(LDFLAGS)
However due to the full patch (I think) this rule does not match, and also if
I (for testing) modify this to not use pathes it does not use the $(DEPS) and
ignores the prerequisits.
I fear implicit rules are not intended to be used this way - what also would
work out is generating a explicit rule for each target like (pseudo code):
foreach x $(X_MODULE_BINARY)
$($(X_MODULE)_OUTPUT)/$(x)%: $(X_MODULE)/$(x).o $(DEPS)
@echo ' LINK EXEC $@'
$(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -o '$@' $^ $(LDFLAGS)
endeach
Thoght I find nothing in the make info page to allow such a construct.
Any ideas?
--
René Rebe - Rubensstr. 64 - 12157 Berlin (Europe / Germany)
http://www.exactcode.de | http://www.t2-project.org
+49 (0)30 255 897 45
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make