2.4 Creating a new Makefile project with existing code

You can create a new Makefile project in Eclipse with your existing source code.

The following procedure shows how to create a new Makefile project in the same directory as your source code:

Procedure

  1. Select File > New > Project... from the main menu.
  2. Expand the C/C++ group.
  3. Select Makefile Project with Existing Code.
  4. Click on Next.
  5. Enter a project name and enter the location of your existing source code.
  6. Select the toolchain that you want to use for Indexer Settings. Indexer Settings provide source code navigation in the Eclipse IDE.
    Figure 2-2 Creating a new Makefile project with existing code
    Creating a new Makefile project with existing code

  7. Click on Finish to create your new project. The project and source files are visible in the Project Explorer view.
  8. Before you can build the project, a Makefile, containing all the compilation tool settings, is required. The easiest way to create one is to copy the Makefile from an example project, and paste it into your new project.
  9. Edit the Makefile for your new project.
  10. Right-click the project and then select Properties > C/C++ Build to access the build settings. In the Builder Settings tab, ensure that the Build directory points to the location of the Makefile.
  11. Add any other source files you need to the project.

Postrequisites

You can now build the new project:
  1. In the Project Explorer view, select the project that you want to build.
  2. Select Project > Build Project from the main menu.
Non-ConfidentialPDF file icon PDF versionARM DUI0480Q
Copyright © 2010-2015 ARM. All rights reserved.