Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: albertolp on May 07, 2010, 07:47:37 pm

Title: compile with autotools
Post by: albertolp on May 07, 2010, 07:47:37 pm
Im trying to compile using c::b and autotools, but its not going good...

Ive got my in myproject/myproject.cbp, the sources it has to compile are in myproject/src and myproject/test

I went to project properties and check "this is a custom Makefile"


but when i try to compile it says:
make: *** No rule to make target `Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
Title: Re: compile with autotools
Post by: stahta01 on May 07, 2010, 08:22:18 pm
You can do either of the below

1. Change Code::Blocks configuration to match the makefile
2. Change the makefile to match Code::Blocks

I find it easier to change the makefile; but, since you are using the autotools this might not be easy.

What is the correct makefile target to be called for building?

Tim S.

Title: Re: compile with autotools
Post by: albertolp on May 08, 2010, 10:57:14 am
myproject/Makefile build the entire project
Title: Re: compile with autotools
Post by: stahta01 on May 09, 2010, 01:16:38 am
I can not help you without getting real answers; I suggest you read about makefile organization; you need to understand what is a makefile target.

http://en.wikipedia.org/wiki/Makefile

Tim S.  

PS: Full Compile Logging might help you to understand what C::B is doing.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Title: Re: compile with autotools
Post by: albertolp on May 10, 2010, 04:15:57 pm
the target is all

and its the first target in my Makefile

Sorry, i misread you there :)
Title: Re: compile with autotools
Post by: stahta01 on May 10, 2010, 05:32:19 pm
the target is all

and its the first target in my Makefile

Sorry, i misread you there :)

Rename the CB target to "all" from "release" or "debug"; and the build should work.

Next is fixing the clean command; I have never fixed it without editing the makefile.
(I believe it is possible; I just never did it.)

The rest uses
Project -> Build Options
Tab "Make" Commands
Please record values before making changing
I have never changed theses settings; not sure best way to change them.

Tim S.
Title: Re: compile with autotools
Post by: Jenna on May 10, 2010, 06:46:19 pm
If the makefile has no release or debug target, you can just remove the $target from the make-commands (including the clean) command and it should work.