aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-10-02 15:40:03 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-10-02 15:48:04 +0200
commitbba0b62f4e9e17927b9a2cda51dd5a4aa1b1f14e (patch)
tree80d58d082ec03dfea2ed1f4c119e3fb251902336
parent9be656dfed53783036c7ae1edae04060b451d6df (diff)
examples: Add distclean target
-rw-r--r--Makefile4
-rw-r--r--examples/Makefile3
-rw-r--r--examples/headers/Makefile3
-rw-r--r--examples/hello/Makefile3
-rw-r--r--examples/html/Makefile3
-rw-r--r--examples/put/Makefile3
6 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9069f27..6027ed4 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,10 @@ clean:
rm -f $(OBJECTS) $(DEPS)
+cd examples && $(MAKE) clean
+distclean: clean
+ rm -f $(PROJECT_A) $(PROJECT_SO)
+ +cd examples && $(MAKE) distclean
+
FORCE:
examples: FORCE
diff --git a/examples/Makefile b/examples/Makefile
index e6030ac..b06f0a5 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -13,6 +13,9 @@ all: FORCE
clean: FORCE
+for d in $(DIRS); do (cd $$d && $(MAKE) clean); done
+distclean: clean
+ +for d in $(DIRS); do (cd $$d && $(MAKE) distclean); done
+
$(DIRS): FORCE
+cd $@ && $(MAKE)
diff --git a/examples/headers/Makefile b/examples/headers/Makefile
index 4905fbd..c8c5f54 100644
--- a/examples/headers/Makefile
+++ b/examples/headers/Makefile
@@ -14,6 +14,9 @@ all: $(PROJECT)
clean:
rm -f $(DEPS)
+distclean: clean
+ rm -f $(PROJECT)
+
FORCE:
$(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR)
diff --git a/examples/hello/Makefile b/examples/hello/Makefile
index e31bd6d..4e22af2 100644
--- a/examples/hello/Makefile
+++ b/examples/hello/Makefile
@@ -14,6 +14,9 @@ all: $(PROJECT)
clean:
rm -f $(DEPS)
+distclean: clean
+ rm -f $(PROJECT)
+
FORCE:
$(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR)
diff --git a/examples/html/Makefile b/examples/html/Makefile
index 59612ed..e7dae66 100644
--- a/examples/html/Makefile
+++ b/examples/html/Makefile
@@ -14,6 +14,9 @@ all: $(PROJECT)
clean:
rm -f $(DEPS)
+distclean: clean
+ rm -f $(PROJECT)
+
FORCE:
$(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR)
diff --git a/examples/put/Makefile b/examples/put/Makefile
index 972208b..0a15069 100644
--- a/examples/put/Makefile
+++ b/examples/put/Makefile
@@ -14,6 +14,9 @@ all: $(PROJECT)
clean:
rm -f $(DEPS)
+distclean: clean
+ rm -f $(PROJECT)
+
FORCE:
$(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR)