2.3 Creating an empty Makefile project

Sometimes, you might want to create an empty C or C++ Makefile project.

This example shows how to do this for an ARM Linux target:


  1. Select File > New > Project... from the main menu.
  2. Expand the C/C++ group.
  3. Select either C Project or C++ Project.
  4. Click on Next.
  5. Enter a project name.
  6. Leave the Use default location option selected so that the project is created in the default folder shown. Alternatively, deselect this option and browse to your preferred project folder.
  7. Expand the Makefile project group.
  8. Select Empty project in the Project type panel.
  9. Select the toolchain that you want to use when building your project. For example if your project is for an ARM Linux target, select the appropriate GCC toolchain.
  10. Click on Finish to create your new project. The project is visible in the Project Explorer view.
  11. 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 the example project, hello and paste it into your new project. The hello project is in the Linux examples provided with DS-5.
  12. Edit the Makefile as follows:
    1. Locate the line that contains OBJS = hello.o.
    2. Replace hello.o with the names of the object files corresponding to your source files.
    3. Locate the line that contains TARGET = hello.
    4. Replace hello with the name of the target image file corresponding to your source files.
    5. Save the file.
  13. 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.
  14. Add your C/C++ files to the project.


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.