Makefile: add PHONY targets
[model-checker.git] / Makefile
index f6a0837eea4e38f076da313859eeedff14eaf6d9..53b0331f2a250f7a18af120f87929b4cee605fdd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,10 +27,7 @@ all: $(LIB_SO) $(DEPS) tests
 $(DEPS): $(program_C_SRCS) $(program_H_SRCS)
        $(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS)
 
-# Only include, rebuild make.deps when it's going to be used
-ifeq ($(MAKECMDGOALS),$(DEPS))
 include $(DEPS)
-endif
 
 debug: CPPFLAGS += -DCONFIG_DEBUG
 debug: all
@@ -47,15 +44,21 @@ malloc.o: malloc.c
 %.o: %.cc
        $(CXX) -fPIC -c $< $(CPPFLAGS)
 
+PHONY += clean
 clean:
        rm -f *.o *.so
        $(MAKE) -C $(TESTS_DIR) clean
 
+PHONY += mrclean
 mrclean: clean
        rm -rf docs
 
-tags::
+PHONY += tags
+tags:
        ctags -R
 
-tests:: $(LIB_SO)
+PHONY += tests
+tests: $(LIB_SO)
        $(MAKE) -C $(TESTS_DIR)
+
+.PHONY: $(PHONY)