I am quite newbie in using eclipse cdt. I have a makefile project, and have more than two targets in my Makefile. Say the Makefile is as follows,
all:
...
t1:
...
t2:
...
it's easy to make CDT build target 'all'. However, how can I build targets other than the first one, like t1 and t2? Thanks.
A "make target" provides a way for developers to interactively select a makefile target from within the Eclipse environment. It is assumed that the makefile is named makefile , which will allow it to run with the default build tool configuration. This can be changed but is cleaner if defaults are used.
Since you already have a makefile, you can create a project with File --> New --> Project --> C/C++ --> Makefile Project with Existing Code. The dialog that pops up asks for the name of the project and the location. Make the location the main directory. and pick whatever project name your want.
The CDT is Eclipse's C/C++ Development Tooling project. It is an industrial-strength C/C++ IDE that also serves as a platform for others to provide value-added tooling for C/C++ developers.
In eclipse, go to:
Window > Show View > Make Target
In the view that opens up, right click your project, click on "New".
Give your target a name, say "T1". Uncheck the "same as the target name" and put the "Make Target" value to t1. Same for t2.
The next time you want to build your targets, look at the Make Target view that you opened, and double click the target you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With