Question
Using custom Makefile with Eclipse/CDT
I have a project of multiple .c
and .h
files and I write my own makefile.
How can I configure Eclipse to use my makefile and my source files from their original locations?
Question
I have a project of multiple .c
and .h
files and I write my own makefile.
How can I configure Eclipse to use my makefile and my source files from their original locations?
Solution
You can create a custom Makefile and make sure it's in your project root. Then you need to disable the auto generated makefiles. You can do that by going here:
Project Properties (right click on project and select properties) -> C/C++ Build -> in that window uncheck "Generate Makefiles Automatically."
To use your own targets you can open the View called "Make Target":
Window -> Show View -> Make Target
In that view you can create a new target that will use the corresponding target in your custom Makefile.
Solution
There is an option to create a project from existing makefiles: use the "Project Wizard" and select "Makefile project".