Author Topic: make: *** No rule to make target `Debug'. Stop.  (Read 20113 times)

Offline fh.bui

  • Single posting newcomer
  • *
  • Posts: 3
make: *** No rule to make target `Debug'. Stop.
« 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?






« Last Edit: May 03, 2011, 02:15:43 pm by fh.bui »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #1 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"
(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 fh.bui

  • Single posting newcomer
  • *
  • Posts: 3
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #2 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.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #3 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.
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #4 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.

Offline fh.bui

  • Single posting newcomer
  • *
  • Posts: 3
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #5 on: May 07, 2011, 01:06:39 pm »
Thank you guys for your help. I will try the posted solution and state the result.

Offline Eli_A

  • Single posting newcomer
  • *
  • Posts: 3
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #6 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?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #7 on: June 25, 2022, 12:02:55 am »
What are the rules of your makefile?

Offline Eli_A

  • Single posting newcomer
  • *
  • Posts: 3
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #8 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

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #9 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.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: make: *** No rule to make target `Debug'. Stop.
« Reply #10 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