Author Topic: Makefile error when compiling program.  (Read 5278 times)

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Makefile error when compiling program.
« on: March 30, 2011, 01:10:45 pm »
I am using code blocks for PSP (gaming console) development.
to use code blocks for psp dev i need to set the enviroment for development.

i almost done everything that i should do but when i compile the program i am getting the following makefile error.....
Code
Using makefile: Makefile
make: *** No rule to make target `Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
I am using custom makefile.

how can i fix this  :? ?

additional info - codeblocks version - svn 6931

OS - windows 7 (ultimate)

and it's not a windows dev envrionment it's for PSP so i am using PSPSDK.

and fix me if i am asking this question in wrong thread i am a newbie here.


 
   

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Makefile error when compiling program.
« Reply #1 on: March 30, 2011, 02:19:28 pm »
Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

The open project -> build options -> last tab (it is hidden most of the time) and change the settings to match your makefile
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Makefile error when compiling program.
« Reply #2 on: March 31, 2011, 06:40:46 am »
how can i fix this  :? ?
The compiler tells you that your custom Makefile does not have a target named "Debug" so he cannot continue.

Why your Makefile does not have such a target I don't know - you've developed it. If you need a different target to be called for the Makefile to work, rename your target in Code::Blocks accordingly. Usually a target named "all" exists in the Makefile and will work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Makefile error when compiling program.
« Reply #3 on: March 31, 2011, 08:50:30 am »
after some effort i found the error just changed some makefile option. but i am getting a new error (related from pspdev environment it says - "can not find -lpspdebug " ). i can fix it my self but i need some help about other linker option if any one can give me some information about "other linker" option that would be really helpfull otherwise it's fine.

thanks for everyone who replied.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Makefile error when compiling program.
« Reply #4 on: March 31, 2011, 10:19:37 am »
"other linker" option that would be really helpfull otherwise it's fine.
This is only available, if you use a native C::B project and therefore the native C::B build system. If you have a Makefile based project, nearly all your setup is done in the Makefile (that's why it's a Makefile project). So the setting in the compiler / linker options will not apply.

If you want to use C::B's build system natively (which is way more performant and flexible than Makefile's btw...) you have to transfer all your settings from the Makefile and disable the "Use custom Makefile" option.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Makefile error when compiling program.
« Reply #5 on: March 31, 2011, 03:38:51 pm »
Thanks i done what you said and now it's running smooth as butter.

that custom Makefile was really pain in my ...(some part of my body :lol:).

it really messes up things.

thanks MortenMacFly for your support.