Well, I think I actually understood, this time, but it's ugly. Utils.cpp and CGrabBuffer.cpp should not get their own individual goals, because there does not seem to be an appropriate target type. Instead, you will need to create an archive or library that will automatically compile Utils.cpp and CGrabBuffer.cpp for you. Below I assume you want a static one, but it is easy to change it.
[For those who are not familiar with archives or libraries, they simply collect .o files in a separate block. In fact, this does not complicate the compilation. Read more here .]
1) Follow the first two and a half steps above (including creating the main goal, but not other goals).
2) Go to Utils.cpp and execute Mx ede-new-target ; name: aux ; type: archive . When prompted, add Utils.cpp for this purpose.
3) Go to CGrabBuffer.cpp and execute Cc . a Cc . a ; Target: aux .
4) Restore the Makefile with Mx ede-proj-regenerate . At this point, if you run make in the other subdirectory, you should get the libaux.a archive.
5) Return to main.cpp and execute Mx ede-customize-current-target . This creates an interactive emacs configuration buffer that allows you to edit ede configuration details. In the Ldflags section Ldflags press [INS] . This displays a new line in which Link Flag: is written, and you have a window with different colors for input (my gray). Type -Lother -laux so that other/libaux.a will be included when compiling main . Then at the top of the buffer, click [Accept] , which should save this change and return to main.cpp.
6) Restore the Makefile with Mx ede-proj-regenerate .
Now, unfortunately, the Makefile sets the main target first, then goes down to the other directory and does it. Unfortunately, this means that make from the top-level directory will not work on a clean tree. I don’t know why this is so, because it seems that it will never be what you want in any project that has ever been done with EDE. I cannot find a way to change this other than this hack:
7) Do Mx customize-project ; in the Inference-Rules section, click [INS] . Then enter Target: all ; Dependencies: aux main ; Rules: [INS] ; String @: (This is the last to prevent an error with an empty tab rule, presumably an EDE error.) Click [Accept] and regenerate the Make files.
So now in your top directory you can just run make, and main should be a working executable.
I quickly become convinced that EDE is not yet ready for use by people who are not its authors. Despite its size and the amount of effort that they clearly put into it, it is too buggy, too controversial and not smart enough. It's a shame. Emacs needs this.