Author Topic: Can't change build method to makefiles  (Read 5206 times)

boom

  • Guest
Can't change build method to makefiles
« on: August 17, 2008, 01:57:06 pm »
Hi,

since a few days i'm trying to change the build method to "use makefiles", but i can't because the "build method"-option is disabled.
I'm using C::B 8.02 and Ubuntu 8.04 and i've installed gnu make.

Any idea how i can solve this problem?

Offline shador

  • Single posting newcomer
  • *
  • Posts: 8
Re: Can't change build method to makefiles
« Reply #1 on: September 18, 2008, 02:13:26 pm »
I have the exactly the same problem. I want to use a custom makefile but the option you are supposed to activate isn't even there.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Can't change build method to makefiles
« Reply #2 on: September 18, 2008, 02:40:46 pm »
Go to the first tab of your projects properties and check the "This is a custom Makefile" checkbox.
Be sure that the name of the makefile is spelled correctly (especially on Linux :"makefile" != "Makefile" !!!).

Then open "Build options..." and switch to the right-most tab ( "Make" commands ) and change the commands to work with your makefile.

Offline shador

  • Single posting newcomer
  • *
  • Posts: 8
Re: Can't change build method to makefiles
« Reply #3 on: September 18, 2008, 04:46:57 pm »
Thank you for the help. Unfortunetely there is no tab under "Build options" that has anything to do with make. The rightmost tab is "# defines" This anything familiar? I've seen a few other posts with similar topics.

« Last Edit: September 18, 2008, 04:55:19 pm by shador »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Can't change build method to makefiles
« Reply #4 on: September 18, 2008, 04:57:15 pm »
Thank you for the help. Unfortunetely there is no tab under "Build options" that has anything to do with make. This anything familiar? I've seen a few other posts with similar topics.

Then open "Build options..." and switch to the right-most tab ( "Make" commands ) and change the commands to work with your makefile.

If you have opened the "Build options", there is a small black triangle at the right side of the tabs, click on it, until you come to the rightmost of them.

Offline shador

  • Single posting newcomer
  • *
  • Posts: 8
Re: Can't change build method to makefiles
« Reply #5 on: September 18, 2008, 05:06:09 pm »
Haha now I feel so stupid =)

Well, now the next problem is what I want to change the commands to. Only thing I did when I compiled in the shell was write make in the folder with the cpp file and makefile and then it was done. Any pointers on what needs to be done?

EDIT: Well still don't know what I'm gonna change in the Build Options tab you mentioned but I think I've found another problem. The FAQ on the wiki says; In "Compiler Settings", under the tab "Other", there's a setting called "Build Method". Choose "Work with makefiles".

But the "Build Method" setting is greyed out and cannot be changed by some reason.
« Last Edit: September 18, 2008, 05:22:54 pm by shador »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Can't change build method to makefiles
« Reply #6 on: September 18, 2008, 05:32:50 pm »
See this post of mine help you; been up all night so not able to help much right now.

Tim S

http://forums.codeblocks.org/index.php/topic,8678.0.html
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline shador

  • Single posting newcomer
  • *
  • Posts: 8
Re: Can't change build method to makefiles
« Reply #7 on: September 18, 2008, 05:44:46 pm »
See this post of mine help you; been up all night so not able to help much right now.

Tim S

http://forums.codeblocks.org/index.php/topic,8678.0.html


Well I see it but still nothing =) A problem for me is also that I don't have good knowledge of makefiles. The one I use was made for me. Guess I should learn how to use makefiles better before bothering you guys with issues ^^

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Can't change build method to makefiles
« Reply #8 on: September 18, 2008, 06:35:55 pm »
If you normally only type "make", just remove the "$target" from the build command in the "Make commands" tab.

As I wrote before be sure you have spelled the name of the makefile correctly in projects properties. And the path (if any) to the makefile is relative to the projects root directory.

Offline shador

  • Single posting newcomer
  • *
  • Posts: 8
Re: Can't change build method to makefiles
« Reply #9 on: September 18, 2008, 06:40:57 pm »
Well then, looks like problem is solved. Double up actually. I can now choose to compile either with the makefile and the usual way. Had to fiddle with include files and some libs.

Thank you both for the help. It's always nice to see that there are people willing to help newbies without throwing sarcasm left and right =)