VanGoghsCoffee VanGoghsCoffee - 3 months ago 5
C++ Question

What's missing: make: *** No rule to make target

I'd love to move my C++ environment away from Visual Studio on Windows to building simple software on MacOS or Ubuntu.

My test project for doing so (am small Snake game) contains the following structure

Snake
|- bin
|- data
|- docs
|- lib
|- inc
|- application
|- app_main.h
|- app_game_state.h
|- app_load_map_state.h
|- app_main_menu_state.h
|- app_play_state.h
|- app_shutdown_state.h
|- app_startup_state.h
|- app_state.h
|- app_unload_map_state.h
|- core
|- graphics
|- gui
|- logic
|- world
|- intern
|- build
|- obj
|- tests
|- src
|- application
|- Makefile
|- main.cpp
|- app_main.cpp
|- app_game_state.cpp
|- app_load_map_state.cpp
|- app_main_menu_state.cpp
|- app_play_state.cpp
|- app_shutdown_state.cpp
|- app_startup_state.cpp
|- app_state.cpp
|- app_unload_map_state.cpp
|- core
|- graphics
|- gui
|- logic
|- world


The
Makefile
is structured as follows:

IDIR = ../../../inc
CC = g++
CFLAGS = -I$(IDIR)

ODIR = ../../build/obj
LDIR = ../../../lib

VPATH = ../core:../graphics/:../gui/:../logic/:../world/

_DEPS = app_game_state.h app_load_map_state.h app_main.h app_main_menu_state.h app_play_state.h app_shutdown_state.h app_startup_state.h app_state.h app_unload_map_state.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))

_OBJ = main.o app_game_state.o app_load_map_state.o app_main.o app_main_menu_state.o app_play_state.o app_shutdown_state.o app_startup_state.o app_state.o app_unload_map_state.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))

$(ODIR)/%.o: %.cpp $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

main: $(OBJ)
g++ -o $@ $^ $(CFLAGS) $(LIBS)

.PHONY: clean

clean:
rm -f $(ODIR)/*.o *~core $(INCDIR)/*~


My aim was to port what I've learned from this excellent beginner tutorial on Makefiles to my own architecture. The tutorials
make
command is running without problems on my machine. So I guess I've missed something.

As I'm being new to Makefiles, it's a bit hard for me to grasp the concepts. Even though I thought to understand the basics, the make command returns a
make: *** No rule to make target '../../build/obj/main.o', needed by 'main'. Stop.
error when I run make from
intern/src/application


To solve the problem I tried to apply the solution from gcc makefile error: "No rule to make target ..." to my code - yet without success.

Where's the error in my Makefile and what did I not understand?

Edit:
Here's the make output with the -d flag enabled (had to remove some code from the beginning due to stackoverflows limitation of symbols in a message)

GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
Reading makefiles...
Reading makefile `Makefile'...
...
Looking for a rule with intermediate file `Makefile.S'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `Makefile.S'.
Trying implicit prerequisite `Makefile.S,v'.
Trying pattern rule with stem `Makefile.S'.
Trying implicit prerequisite `RCS/Makefile.S,v'.
Trying pattern rule with stem `Makefile.S'.
Trying implicit prerequisite `RCS/Makefile.S'.
Trying pattern rule with stem `Makefile.S'.
Trying implicit prerequisite `s.Makefile.S'.
Trying pattern rule with stem `Makefile.S'.
Trying implicit prerequisite `SCCS/s.Makefile.S'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.S'.
Trying pattern rule with stem `Makefile'.
Trying implicit prerequisite `Makefile.mod'.
Looking for a rule with intermediate file `Makefile.mod'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `Makefile.mod'.
Trying implicit prerequisite `Makefile.mod,v'.
Trying pattern rule with stem `Makefile.mod'.
Trying implicit prerequisite `RCS/Makefile.mod,v'.
Trying pattern rule with stem `Makefile.mod'.
Trying implicit prerequisite `RCS/Makefile.mod'.
Trying pattern rule with stem `Makefile.mod'.
Trying implicit prerequisite `s.Makefile.mod'.
Trying pattern rule with stem `Makefile.mod'.
Trying implicit prerequisite `SCCS/s.Makefile.mod'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.c'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.cc'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.C'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.cpp'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.p'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.f'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.F'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.m'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.r'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.s'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.S'.
Trying pattern rule with stem `Makefile'.
Rejecting impossible implicit prerequisite `Makefile.mod'.
Trying pattern rule with stem `Makefile'.
Trying implicit prerequisite `Makefile.sh'.
Looking for a rule with intermediate file `Makefile.sh'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `Makefile.sh,v'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `RCS/Makefile.sh,v'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `RCS/Makefile.sh'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `s.Makefile.sh'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `SCCS/s.Makefile.sh'.
No implicit rule found for `Makefile'.
Finished prerequisites of target file `Makefile'.
No need to remake target `Makefile'.
Updating goal targets....
Considering target file `main'.
File `main' does not exist.
Considering target file `../../build/obj/main.o'.
File `../../build/obj/main.o' does not exist.
Looking for an implicit rule for `../../build/obj/main.o'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `main.cpp'.
Trying rule prerequisite `../../../inc/app_game_state.h'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.c'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.cc'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.C'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.cpp'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.p'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.f'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.F'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.m'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.r'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.s'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.S'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.mod'.
Trying pattern rule with stem `main.o'.
Trying implicit prerequisite `../../build/obj/main.o,v'.
Trying pattern rule with stem `main.o'.
Trying implicit prerequisite `../../build/obj/RCS/main.o,v'.
Trying pattern rule with stem `main.o'.
Trying implicit prerequisite `../../build/obj/RCS/main.o'.
Trying pattern rule with stem `main.o'.
Trying implicit prerequisite `../../build/obj/s.main.o'.
Trying pattern rule with stem `main.o'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.o'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `main.cpp'.
Trying rule prerequisite `../../../inc/app_game_state.h'.
Looking for a rule with intermediate file `../../../inc/app_game_state.h'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `app_game_state.h'.
Trying implicit prerequisite `../../../inc/app_game_state.h,v'.
Trying pattern rule with stem `app_game_state.h'.
Trying implicit prerequisite `../../../inc/RCS/app_game_state.h,v'.
Trying pattern rule with stem `app_game_state.h'.
Trying implicit prerequisite `../../../inc/RCS/app_game_state.h'.
Trying pattern rule with stem `app_game_state.h'.
Trying implicit prerequisite `../../../inc/s.app_game_state.h'.
Trying pattern rule with stem `app_game_state.h'.
Trying implicit prerequisite `../../../inc/SCCS/s.app_game_state.h'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.c'.
Looking for a rule with intermediate file `../../build/obj/main.c'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.y'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.l'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.w'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.w'.
Trying pattern rule with stem `main.c'.
Trying implicit prerequisite `../../build/obj/main.c,v'.
Trying pattern rule with stem `main.c'.
Trying implicit prerequisite `../../build/obj/RCS/main.c,v'.
Trying pattern rule with stem `main.c'.
Trying implicit prerequisite `../../build/obj/RCS/main.c'.
Trying pattern rule with stem `main.c'.
Trying implicit prerequisite `../../build/obj/s.main.c'.
Trying pattern rule with stem `main.c'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.c'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.y'.
Looking for a rule with intermediate file `../../build/obj/main.y'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.y'.
Trying implicit prerequisite `../../build/obj/main.y,v'.
Trying pattern rule with stem `main.y'.
Trying implicit prerequisite `../../build/obj/RCS/main.y,v'.
Trying pattern rule with stem `main.y'.
Trying implicit prerequisite `../../build/obj/RCS/main.y'.
Trying pattern rule with stem `main.y'.
Trying implicit prerequisite `../../build/obj/s.main.y'.
Trying pattern rule with stem `main.y'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.y'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.l'.
Looking for a rule with intermediate file `../../build/obj/main.l'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.l'.
Trying implicit prerequisite `../../build/obj/main.l,v'.
Trying pattern rule with stem `main.l'.
Trying implicit prerequisite `../../build/obj/RCS/main.l,v'.
Trying pattern rule with stem `main.l'.
Trying implicit prerequisite `../../build/obj/RCS/main.l'.
Trying pattern rule with stem `main.l'.
Trying implicit prerequisite `../../build/obj/s.main.l'.
Trying pattern rule with stem `main.l'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.l'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.w'.
Looking for a rule with intermediate file `../../build/obj/main.w'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.w'.
Trying implicit prerequisite `../../build/obj/main.w,v'.
Trying pattern rule with stem `main.w'.
Trying implicit prerequisite `../../build/obj/RCS/main.w,v'.
Trying pattern rule with stem `main.w'.
Trying implicit prerequisite `../../build/obj/RCS/main.w'.
Trying pattern rule with stem `main.w'.
Trying implicit prerequisite `../../build/obj/s.main.w'.
Trying pattern rule with stem `main.w'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.w'.
Trying pattern rule with stem `main'.
Rejecting impossible implicit prerequisite `../../build/obj/main.w'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.cc'.
Looking for a rule with intermediate file `../../build/obj/main.cc'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.cc'.
Trying implicit prerequisite `../../build/obj/main.cc,v'.
Trying pattern rule with stem `main.cc'.
Trying implicit prerequisite `../../build/obj/RCS/main.cc,v'.
Trying pattern rule with stem `main.cc'.
Trying implicit prerequisite `../../build/obj/RCS/main.cc'.
Trying pattern rule with stem `main.cc'.
Trying implicit prerequisite `../../build/obj/s.main.cc'.
Trying pattern rule with stem `main.cc'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.cc'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.C'.
Looking for a rule with intermediate file `../../build/obj/main.C'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.C'.
Trying implicit prerequisite `../../build/obj/main.C,v'.
Trying pattern rule with stem `main.C'.
Trying implicit prerequisite `../../build/obj/RCS/main.C,v'.
Trying pattern rule with stem `main.C'.
Trying implicit prerequisite `../../build/obj/RCS/main.C'.
Trying pattern rule with stem `main.C'.
Trying implicit prerequisite `../../build/obj/s.main.C'.
Trying pattern rule with stem `main.C'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.C'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.cpp'.
Looking for a rule with intermediate file `../../build/obj/main.cpp'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.cpp'.
Trying implicit prerequisite `../../build/obj/main.cpp,v'.
Trying pattern rule with stem `main.cpp'.
Trying implicit prerequisite `../../build/obj/RCS/main.cpp,v'.
Trying pattern rule with stem `main.cpp'.
Trying implicit prerequisite `../../build/obj/RCS/main.cpp'.
Trying pattern rule with stem `main.cpp'.
Trying implicit prerequisite `../../build/obj/s.main.cpp'.
Trying pattern rule with stem `main.cpp'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.cpp'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.p'.
Looking for a rule with intermediate file `../../build/obj/main.p'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.web'.
Trying pattern rule with stem `main.p'.
Trying implicit prerequisite `../../build/obj/main.p,v'.
Trying pattern rule with stem `main.p'.
Trying implicit prerequisite `../../build/obj/RCS/main.p,v'.
Trying pattern rule with stem `main.p'.
Trying implicit prerequisite `../../build/obj/RCS/main.p'.
Trying pattern rule with stem `main.p'.
Trying implicit prerequisite `../../build/obj/s.main.p'.
Trying pattern rule with stem `main.p'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.p'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.web'.
Looking for a rule with intermediate file `../../build/obj/main.web'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.web'.
Trying implicit prerequisite `../../build/obj/main.web,v'.
Trying pattern rule with stem `main.web'.
Trying implicit prerequisite `../../build/obj/RCS/main.web,v'.
Trying pattern rule with stem `main.web'.
Trying implicit prerequisite `../../build/obj/RCS/main.web'.
Trying pattern rule with stem `main.web'.
Trying implicit prerequisite `../../build/obj/s.main.web'.
Trying pattern rule with stem `main.web'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.web'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.f'.
Looking for a rule with intermediate file `../../build/obj/main.f'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.F'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.r'.
Trying pattern rule with stem `main.f'.
Trying implicit prerequisite `../../build/obj/main.f,v'.
Trying pattern rule with stem `main.f'.
Trying implicit prerequisite `../../build/obj/RCS/main.f,v'.
Trying pattern rule with stem `main.f'.
Trying implicit prerequisite `../../build/obj/RCS/main.f'.
Trying pattern rule with stem `main.f'.
Trying implicit prerequisite `../../build/obj/s.main.f'.
Trying pattern rule with stem `main.f'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.f'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.F'.
Looking for a rule with intermediate file `../../build/obj/main.F'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.F'.
Trying implicit prerequisite `../../build/obj/main.F,v'.
Trying pattern rule with stem `main.F'.
Trying implicit prerequisite `../../build/obj/RCS/main.F,v'.
Trying pattern rule with stem `main.F'.
Trying implicit prerequisite `../../build/obj/RCS/main.F'.
Trying pattern rule with stem `main.F'.
Trying implicit prerequisite `../../build/obj/s.main.F'.
Trying pattern rule with stem `main.F'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.F'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.r'.
Looking for a rule with intermediate file `../../build/obj/main.r'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main'.
Rejecting impossible implicit prerequisite `../../build/obj/main.l'.
Trying pattern rule with stem `main.r'.
Trying implicit prerequisite `../../build/obj/main.r,v'.
Trying pattern rule with stem `main.r'.
Trying implicit prerequisite `../../build/obj/RCS/main.r,v'.
Trying pattern rule with stem `main.r'.
Trying implicit prerequisite `../../build/obj/RCS/main.r'.
Trying pattern rule with stem `main.r'.
Trying implicit prerequisite `../../build/obj/s.main.r'.
Trying pattern rule with stem `main.r'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.r'.
Trying pattern rule with stem `main'.
Rejecting impossible implicit prerequisite `../../build/obj/main.F'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.m'.
Looking for a rule with intermediate file `../../build/obj/main.m'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.ym'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.lm'.
Trying pattern rule with stem `main.m'.
Trying implicit prerequisite `../../build/obj/main.m,v'.
Trying pattern rule with stem `main.m'.
Trying implicit prerequisite `../../build/obj/RCS/main.m,v'.
Trying pattern rule with stem `main.m'.
Trying implicit prerequisite `../../build/obj/RCS/main.m'.
Trying pattern rule with stem `main.m'.
Trying implicit prerequisite `../../build/obj/s.main.m'.
Trying pattern rule with stem `main.m'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.m'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.ym'.
Looking for a rule with intermediate file `../../build/obj/main.ym'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.ym'.
Trying implicit prerequisite `../../build/obj/main.ym,v'.
Trying pattern rule with stem `main.ym'.
Trying implicit prerequisite `../../build/obj/RCS/main.ym,v'.
Trying pattern rule with stem `main.ym'.
Trying implicit prerequisite `../../build/obj/RCS/main.ym'.
Trying pattern rule with stem `main.ym'.
Trying implicit prerequisite `../../build/obj/s.main.ym'.
Trying pattern rule with stem `main.ym'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.ym'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.lm'.
Looking for a rule with intermediate file `../../build/obj/main.lm'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.lm'.
Trying implicit prerequisite `../../build/obj/main.lm,v'.
Trying pattern rule with stem `main.lm'.
Trying implicit prerequisite `../../build/obj/RCS/main.lm,v'.
Trying pattern rule with stem `main.lm'.
Trying implicit prerequisite `../../build/obj/RCS/main.lm'.
Trying pattern rule with stem `main.lm'.
Trying implicit prerequisite `../../build/obj/s.main.lm'.
Trying pattern rule with stem `main.lm'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.lm'.
Trying pattern rule with stem `main'.
Rejecting impossible implicit prerequisite `../../build/obj/main.r'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.s'.
Looking for a rule with intermediate file `../../build/obj/main.s'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.S'.
Trying pattern rule with stem `main.s'.
Trying implicit prerequisite `../../build/obj/main.s,v'.
Trying pattern rule with stem `main.s'.
Trying implicit prerequisite `../../build/obj/RCS/main.s,v'.
Trying pattern rule with stem `main.s'.
Trying implicit prerequisite `../../build/obj/RCS/main.s'.
Trying pattern rule with stem `main.s'.
Trying implicit prerequisite `../../build/obj/s.main.s'.
Trying pattern rule with stem `main.s'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.s'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.S'.
Looking for a rule with intermediate file `../../build/obj/main.S'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.S'.
Trying implicit prerequisite `../../build/obj/main.S,v'.
Trying pattern rule with stem `main.S'.
Trying implicit prerequisite `../../build/obj/RCS/main.S,v'.
Trying pattern rule with stem `main.S'.
Trying implicit prerequisite `../../build/obj/RCS/main.S'.
Trying pattern rule with stem `main.S'.
Trying implicit prerequisite `../../build/obj/s.main.S'.
Trying pattern rule with stem `main.S'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.S'.
Trying pattern rule with stem `main'.
Rejecting impossible implicit prerequisite `../../build/obj/main.S'.
Trying pattern rule with stem `main'.
Trying implicit prerequisite `../../build/obj/main.mod'.
Looking for a rule with intermediate file `../../build/obj/main.mod'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `main.mod'.
Trying implicit prerequisite `../../build/obj/main.mod,v'.
Trying pattern rule with stem `main.mod'.
Trying implicit prerequisite `../../build/obj/RCS/main.mod,v'.
Trying pattern rule with stem `main.mod'.
Trying implicit prerequisite `../../build/obj/RCS/main.mod'.
Trying pattern rule with stem `main.mod'.
Trying implicit prerequisite `../../build/obj/s.main.mod'.
Trying pattern rule with stem `main.mod'.
Trying implicit prerequisite `../../build/obj/SCCS/s.main.mod'.
No implicit rule found for `../../build/obj/main.o'.
Finished prerequisites of target file `../../build/obj/main.o'.
Must remake target `../../build/obj/main.o'.

Answer

The dependencies for the rule

$(ODIR)/%.o: %.cpp $(DEPS)
    $(CC) -c -o $@ $< $(CFLAGS)

are not satisfied: while make finds main.cpp OK it doesn't find the dependencies from $(DEPS). You can fix the problem by pointing IDIR to the correct directory:

IDIR = = ../../../inc/application

Admittedly, the error message isn't entirely helpful.

Comments