Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: fh.bui on May 03, 2011, 02:08:50 pm

Title: make: *** No rule to make target `Debug'. Stop.
Post by: fh.bui on May 03, 2011, 02:08:50 pm
Hello everyone. I am a bloody new user of code::blocks.

I have some problems compiling a gtk+-project (v.1.x.x) using code::blocks.

I got this error from the build-log:

-------------- Build: Debug in surfwithcodeblock ---------------

Using makefile: Makefile
make: *** No rule to make target `Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
While i was executing make and make install from the shell, i didnt get this error.

Can someone pls help me to solve this problem?






Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: oBFusCATed on May 03, 2011, 02:51:51 pm
Start reading here: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Then search the forum for "custom makefile"
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: fh.bui on May 04, 2011, 11:14:55 am
Hello and thank you very much for your fast answer.
But the problems do still remain after binding the custom makefile into the project.

The custom makefile was directly generated after the execution of the configure script.
I have also tried to modify the make command for building the project.

Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: stahta01 on May 04, 2011, 03:28:34 pm
1. Rename the "Debug" target to match the makefile target or edit the makefile to have an "Debug" target
2. Search this site for other ways to do it.

Tim S.
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: jens on May 04, 2011, 08:25:57 pm
1. Rename the "Debug" target to match the makefile target or edit the makefile to have an "Debug" target
2. Search this site for other ways to do it.

Tim S.

You have to fix "Project -> Build options -> Make commands" to fit your needs.
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: fh.bui on May 07, 2011, 01:06:39 pm
Thank you guys for your help. I will try the posted solution and state the result.
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: Eli_A on June 24, 2022, 03:43:51 pm
Hi,

I have the same problem.

I included the pcapplusplus.mk at my makefile:
include C:\Eli\Projects\dRDI\dRD_parser\mk\PcapPlusPlus.mk

Set the address at the PcapPlusPlus.mk as below:

PCAPPLUSPLUS_HOME := C:\pcapplusplus\pcapplusplus
MINGW_HOME := C:/MinGW/bin
PCAP_SDK_HOME := C:/WpdPack/include

Also, check the Custom make file and the make commands are as below:

$make -f $makefile $target
$make -f $makefile $file
$make -f $makefile clean$target
$make -q -f $makefile $target

But I get the below error:

mingw32-make.exe: *** No rule to make target 'Debug'.  Stop.

Can someone pls help me to solve this problem?
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: BlueHazzard on June 25, 2022, 12:02:55 am
What are the rules of your makefile?
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: Eli_A on June 25, 2022, 02:27:43 am
include ../mk/PcapPlusPlus.mk


# All Target
all:
   g++.exe $(PCAPPP_INCLUDES) -c -o main.o main.cpp
   g++.exe $(PCAPPP_LIBS_DIR) -static-libgcc -static-libstdc++ -o dRDI.exe main.o $(PCAPPP_LIBS)

# Clean Target
clean:
   del main.o
   del dRDI.exe
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: AndrewCot on June 25, 2022, 03:11:47 am
I would suggest finding a site that has tutorials on makefiles so you can get up to speed with makefiles.
Title: Re: make: *** No rule to make target `Debug'. Stop.
Post by: BlueHazzard on June 25, 2022, 12:55:41 pm
if you are using codeblocks with makefiles, codeblocks uses the below command to run your makefile
Code
$make -f $makefile $target
as you can see at the end of the make call codeblocks adds the target name

In your case in the projct the target is called "Debug" and so codeblocks adds "Debug" at the end of the command line. In your makefile the targets are only "all" and "clean"

So you have to rename your targets in codeblocks:
Project->Properties->Build targets
select "Debug" and rename it to "all".
Then before compiling make sure you have selected the "all" target in the drop dow box near the compile button it the tool bar or go to Build->Select target->All