Using existing makefiles

General questions regarding the usage of CodeLite
remo.d
CodeLite Curious
Posts: 2
Joined: Sat Dec 05, 2009 1:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Using existing makefiles

Post by remo.d » Sat Dec 05, 2009 2:11 am

I understand that CodeLite is able to use existing makefiles but I've not been able to understand how to do it in my case.

My project contains a libraries and many executables stored in different directories.:

Code: Select all

  O
  |
  +-- examples
  |       +----- pmx
  |       |         +---- pmx.c
  |       |         +---- makefile
  |       |
  |       +----- unc
  |       |         +---- makefile
  |       |         +---- unc.c
  |     ....
  |       
  +-- src
  |    +--- tbl.h
  |    +--- tbl.c
  |    +--- makefile
  | 
The makefiles are rather complex and behaves depending on the directory I'm in when I launch the "make" process. I currently use pspad on Windows that allows me to start "make" passing the proper argument (e.g. "make release" or "make debug") and using the right directory depending on the file I'm editing.

Is it possible to do something similar with CodeLite? I'd like to swith from an editor (even if good as PsPad) to a real IDE like CodeLite with all the integrated facilies (the debugger and the identifiers crossrerence, mainly).

I wouldn't want to have to revisit the entire building process as the current one is only dependent on gnu-make.

User avatar
eranif
CodeLite Plugin
Posts: 6081
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using existing makefiles

Post by eranif » Sat Dec 05, 2009 5:49 pm

This is currently not possible in the released version (2.0.3365)

This is possible using the trunk version of codelite. You can use the '$(CurrentFilePath)' macro as the working directory under the 'Custom Build' tab in the 'Project Settings'
This will set to the working directory to $(CurrentFilePath) before executing the command under the 'Build/Clean/Rebuild/Compile Single File commands

Eran
Make sure you have read the HOW TO POST thread

remo.d
CodeLite Curious
Posts: 2
Joined: Sat Dec 05, 2009 1:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using existing makefiles

Post by remo.d » Sat Dec 05, 2009 11:03 pm

Thank you Eran, I'll keep an eye on next release then.

Remo.D

Post Reply