From your other post, I saw that you are using custom makefile, if this is the case then there is no problem - just mark the project as custom.
Currently, codelite allows you to set compiler per project. Your best bet is:
1. Define NASM compiler (Settings -> Build Settings ...) and then click on 'New ...' button, give it a name 'nasm' and cick OK, this will create a copy of the 'g++' compiler. Next step is to define the 'Tools', 'General' and 'Switches' tabs. First, at the 'Tools' tab, edit and replace the toolchain (for example: Compiler name: nasm)
In 'General' tab, edit regexes so codelite can parse the compiler output (this is optional, since it is only used to allow you to jump to line/file when error occurs)
2. Create a new project of type 'static library' add all your asm files there, and select the compiler for this project to be the new 'NASM' compiler.
3. In your main project, right click on it, and select 'Build Order...' check the NASM project - so codelite will first build this project and then will compile the C++ code.
Another option:
Use single compiler and project, and define custom makefile rule only for the asm files, to do this:
After you set up your project, right click on it and select the last tab 'Custom makefile steps'
For the sake of the example, I will assume here that you only have 2 asm file
:
In the 'dependencies' filed, enter:
Code: Select all
$(IntermediateDirectory)/myasm1.o $(IntermediateDirectory)/myasm2.o
and as the 'Rule action':
Code: Select all
$(IntermediateDirectory)/myasm1.o: myasm1.asm
nasm -f elf myasm1.asm -o $(IntermediateDirectory)/myasm1.o
$(IntermediateDirectory)/myasm2.o: myasm2.asm
nasm -f elf myasm2.asm -o $(IntermediateDirectory)/myasm2.o
HTH,
Eran