- Don't regenerate make.deps for 'make clean' target
- Place the dependency on make.deps at the correct level; all "%.o"
generations depend on it, not the top-level 'all' target
program_C_SRCS := $(wildcard *.c) $(wildcard *.cc)
DEPS = make.deps
program_C_SRCS := $(wildcard *.c) $(wildcard *.cc)
DEPS = make.deps
-all: $(LIB_SO) $(DEPS) tests
+$(DEPS): build_deps := 1
$(DEPS): $(program_C_SRCS) $(program_H_SRCS)
$(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS)
$(DEPS): $(program_C_SRCS) $(program_H_SRCS)
$(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS)
debug: CPPFLAGS += -DCONFIG_DEBUG
debug: all
debug: CPPFLAGS += -DCONFIG_DEBUG
debug: all
malloc.o: malloc.c
$(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
malloc.o: malloc.c
$(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
$(CXX) -fPIC -c $< $(CPPFLAGS)
PHONY += clean
$(CXX) -fPIC -c $< $(CPPFLAGS)
PHONY += clean