It is a long time since I haven’t done Makefiles. My actual Makefile works except that if a lib in $(LIB) changes, I get a message that make has nothing to do. The dependency on libs in $(LIB) isn’t taken into account. Note that in $(LIB) I have libraries with their full path.
all: $(OBJ_LIST) $(TEST_LOAD) $(TEST_CPP_UNIT) $(LIB)
%.o: %.cpp
g++ -c $(CPPFLAGS) -o $@ $<
You haven’t really expressed any useful dependencies. If you want something specific to be rebuilt when something in
$(LIB)changes, you’ll need to specify that explicitly. For instance: