Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forcing Eclipse to generate standard Unix makefiles

I have an Eclipse project I've been working on for some time now, and I'd like to open source it. But to do that I'd like to have a clean Makefile like the majority of other open source programs. I understand I could make my own, but it would be better if Eclipse could manage it for me. Getting Eclipse to generate a CMake file would be even better, but I can settle for a plain makefile if that is easiest. So, how can I get Eclipse to do this? There are a few posts on the internet that suggest selecting "Managed make" when creating a project, but they were from a few years ago and are outdated. When I try to create a C project, there is the option to create a "Makefile project", but it creates the makefile in a folder called "Linux GCC" and makes everything cluttered. Any suggestions?

like image 333
Cory Walker Avatar asked Aug 13 '09 20:08

Cory Walker


3 Answers

I've been a *nix guy for 25+ years and am a big fan of make. However, making your Eclipse project dependent upon make is going to exclude the Mac and Windows community. Why don't you just export the Eclipse project and open source it as an Eclipse project? Then users can can have it ready to extend if they choose. You didn't specify the language your project is written in, if it's Java (pretty common for Eclipse) why not create an ant build file for the project?

Just a thought.

like image 191
Doug Carter Avatar answered Nov 13 '22 22:11

Doug Carter


I ended up just creating a CMake project by hand. CMake files are really not that hard to make, and it's a lot easier than trying to get Eclipse to do it for you. Plus, they're cross-platform.

like image 44
Cory Walker Avatar answered Nov 13 '22 23:11

Cory Walker


Would a CMakeBuilder eclipse plugin, associated with this tutorial be a good fit for what you are trying to do?

The end result would be something like:

alt text
(source: vtk.org)

like image 41
VonC Avatar answered Nov 13 '22 22:11

VonC