Background
CodeLite's build system uses its internal makefile generator to generate a makefile based on the settings found in the
Workspace, Projects, environment variables and build settings.
However, there are cases when user wishes to use its existing build system.
To allow this, CodeLite supports custom projects, where CodeLite is told to use an external makefile instead of creating its own.
Creating a custom project
To mark a project as a custom project, do the following:
- Important: When enabling the 'custom build' options from the 'Custom Build' tab, it does not matter the type of the project selected in the 'General' tab.
- Right click on the project, and select 'Settings...'
- Switch to the 'Custom Build' tab, and tick 'Enable Custom Build'
- Fill in the build and the clean commands
- You can add as many targets as you wish here
- If you require a pre-make step (e.g. qmake, configure etc.) :
- Select 'Others' from 'Makefile Generators' choice box
- type the command to be executed (e.g.
./configure) - Using the project context menu, you should now have a new option 'Run Others...' (I know the name is bad...)
- Switch to the 'General' tab, and select the appropriate compiler for you (gcc, g++ or VC++) - the purpose of this step, is to tell CodeLite how to parse the output comes from the user's makefile
- Click OK, and you are ready to go
Example:
Assuming a that you have legacy code that resides under C:\devl\myproject and uses makefile for the build process.
The fastest way to import this project into CodeLite is:
- Create a new workspace ('Workspace -> Create New Workspace'), and place it under
C:\devl\myproject - Create a new project ('Workspace -> Create New Project'), give it any name and place it under
C:\devl\myproject - Expand the 'Workspace' icon in the left pane (the one with the 'Workspace' caption), and you will see your newly created project.
- Right-click on the project, and select 'Import Files From Directory'. The import dialog will pop up; accept its defaults and click OK.
- Once the import process completes, you can expand the tree to the left, where you should see all source files imported from the disk.
- Now all that is left to do is to set the project as a custom project, by right-clicking on the project icon, choosing Settings, and completing the resulting dialog; it should look something like this:


