I have a source code of an OpenSource project which I get from SVN. I was able to run autogen --> configure --> and make successfully (through the terminal). But I want to build the same project with Eclipse, and I can't port manually those source files to eclipse though. So, How can I set Eclipse to use external make files ? can anyone please help me ? Thanks.
-
It is not straightforward but it can be done. Create a new Makefile eclipse project and check the build options... I'll have to check, been a while – Sam Post Mar 31 '10 at 05:24
-
Hey, thanks for the quick response. Can you help me little further pls ? – Morpheus Mar 31 '10 at 05:36
3 Answers
Ok, I got it, It was straightforward. Just go to project properties --> C/C++ Build --> Make file generation --> and untick "Generate Make files automatically". In additionally you may have to set the Build location also.

- 1,722
- 5
- 27
- 38
-
Can you please explain the procedure? I am having the similar problem.I have to do ./bootstrap.sh followed by ./configure before make. – Arpit Sep 24 '10 at 12:22
-
Can I know where r u now with your problem? did you able to import the source code into the Eclipse ? (btw, as I can remember I run the configuration part manually, just used the Eclipse for make). – Morpheus Sep 24 '10 at 15:00
-
Does anyone know if this will actually add all source files specified in the makefile to the project explorer?? – kakyo Nov 02 '12 at 17:16
This might vary with different versions. The one I use is Eclipse 3.5 with CDT 6, and it is quite straightforward:
New Project -> C++ Project -> Makefile Project -> Empty project
Untick the 'Use default location' and provide the location where the root of your project and Makefile reside.
I found it misleading at first, and had a couple of dry runs in copied directories to make sure that the 'Empty project' would not clear the Makefile, but the fact is that the option name is probably misleading as 'Empty' stands for CDT will not create a Makefile for you (but won't delete an existing version either)

- 204,818
- 23
- 294
- 489
You may be able to avoid creating a custom makefile. The standard Eclipse autogenerated makefile has a couple of hooks:
.
.
-include ../makefile.init
.
.
.
-include ../makefile.init
.
.
That allow you to add your own tweaks to the build process whilst retaining Eclipse’s build automation.
As an example, I have need to include a binary image in my executable so I have a makefile.defs with:
binaryblob.o:
ld -r -b binary -o binaryblob.o ../binaryblob.mid

- 41
- 2