[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.cdt] Re: Questions about building existing project

Mike Feher wrote:

Greetings,

I ran across a couple of questions/observations today while importing a project. The project is enormous and consists of several top-level directories all within one common directory, and each top-level directoy has multiple nested dirs. Buried deep inside the nested dirs are all of the outputs, libraries, supporting files and most importantly, executables for the program.

This is all on a Linux system.

To build, one simply goes to the top level directory (in an xterm) and executes "make rc init bin" to do the whole thing. There are layers and layers of Makefiles buried in here, and they all must resolve to the various executables.

I noticed that when I created an Eclipse CDT project for this, it not only successfully read in all the files and folders, but also seemed to be able to pick up the top-level Makefile just by me telling it what the top-level directory is and which make command to use (even though I can just invoke "make", Eclipse CDT wanted /usr/bin/make, which on my system is aliased to gmake).

I guess my question/observation is, I don't have to tell it exactly which top-level Makefile to build from, do I?

Also, based on watching the output in the console, it looks like (from the amount of text it output as well as the time it took), I assume the build process essentially worked.

My other question, based on a company Wiki page describing that I have to "Add Make Targets", is, Do I really need to do this? I am not going to try and find potentially upwards of 100 executables and add them all individually as make targets. (I am basically trying to get Eclipse CDT to recognize the huge pile of code and build it exactly the way I would do it manually.)

Comments?

Mike
If you select "Build project" Eclipse just executes "make all" in the top level directory i.e. root folder of the project. You can change this behavior (name of make, targets, working dir etc.) in the project properties page (C/C++ Build). "Make Targets" are necessary if you have for e.g. root_folder/sub1/sub2/Makefile and you want to execute this specific makefile.
I hope this helps you.


 Axel