I have seen this question and am somehow still unable to get make
to properly call another Makefile
. Here is my Makefile
:
base:
cd Base && $(MAKE)
Base
is a sub-directory of my current directory where there is a different Makefile
used to compile the files in said folder. However, when I call make
, I simply get nothing to be done for base
, whereas when I do cd Base && make
from the command-line, I get expected behavior (i.e., compilation occurs). In case it is something wrong with the Makefile
in Base
, here is a copy of that as well:
CC=g++
CFLAGS=-O3 -Wall -pedantic -Werror -c
LINK=g++
LFLAGS=-O3
SRC=main.cpp
OBJ=..\lib\main.o
EXE=..\bin\test.exe
all: $(EXE)
$(EXE): $(OBJ) $(SRC)
$(LINK) $(LFLAGS) $(OBJ) -o $(EXE)
..\lib\main.o: main.cpp
$(CC) $(CFLAGS) $< -o $@