Author Topic: "Run" with a custom Makefile  (Read 16933 times)

Olivia

  • Guest
"Run" with a custom Makefile
« on: August 04, 2007, 12:30:52 am »
I build my project with a custom Makefile. Now, how can I "run" my customly built application?

In other words: can I configure the "run" button to run the app that my Makefile made? Right now, it always tells me my project isn't built, although it is (and the app runs nicely from a terminal), and then does nothing.

Thanks in advance!

mariocup

  • Guest
Re: "Run" with a custom Makefile
« Reply #1 on: August 04, 2007, 10:41:18 am »
Hi Olivia,

to run a custom makefile you have to go to the project properties of your cb project. Select the tab project settings and enable this is a custom makefile.


Offline yop

  • Regular
  • ***
  • Posts: 387
Re: "Run" with a custom Makefile
« Reply #2 on: August 04, 2007, 01:08:41 pm »
This is a typical "problem" of C::B with Makefiles. This happens because make dives into subdirectories while building (so each path is relative to the target path) while C::B invokes make from the project top level directory and each path is relative to the project top level dir. It's not a bug, they're just different and since it is a custom Makefile you have to make sure that it plays nice with what C::B expects to find ;-)
So I 'd suggest having both the C::B project .cbp file and your Makefile in the same folder while building or alternatively make you Makefile compatible with the C::B build system. The later approach is what I use in QtWorkbench after a lot of time of having the same issues.
Life would be so much easier if we could just look at the source code.

Olivia

  • Guest
Re: "Run" with a custom Makefile
« Reply #3 on: August 07, 2007, 01:15:35 pm »
Thank you very much for your replies.

I solved the problem by changing the "output filename" and the "execution working dir" in the "project properties" to point to the filename and dir from my Makefile. Now "run" really runs :)