From c960cd6f326d1bf60928db8f3917ed736a812c3d Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 30 Jan 2026 22:18:00 +0100 Subject: [PATCH] build: adding rules ex1/ex2 to the Makefile --- C/Makefile | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/C/Makefile b/C/Makefile index 353f26f..c1600fe 100644 --- a/C/Makefile +++ b/C/Makefile @@ -91,6 +91,31 @@ $(OBJDIRNAME)/%.o: %.c @printf '$(GREY) Compiling $(END)$(GREEN)$<$(END)\n' @$(CC) $(CFLAGS) -c -o $@ $< +test: test_colleen test_grace test_sully + +test_colleen: $(COLLEEN) + @clear + @rm -rf /tmp/test_colleen.c + @$(COLLEEN) > /tmp/test_colleen.c + @printf '$(GREY)Output of the $(GOLD)Colleen$(RESET)\n' + @bat -plc /tmp/test_colleen.c + @printf '\n$(GREY)Here's the diff between $(GOLD)$(SRC_COLLEEN) $(GREY)and $(GOLD)/tmp/test_colleen.c$(RESET)\n' + @diff $(SRC_COLLEEN) /tmp/test_colleen.c | bat -ldiff + +test_grace: $(GRACE) + @$(GRACE) > /tmp/test_grace.c + @printf '\n\n\n$(GREY)Output of the $(GOLD)Grace$(RESET)\n' + @bat -plc /tmp/test_grace.c + @printf '\n$(GREY)Here's the diff between $(GOLD)$(SRC_GRACE) $(GREY)and $(GOLD)/tmp/test_grace.c$(RESET)\n' + @diff $(SRC_GRACE) /tmp/test_grace | bat -ldiff + +test_sully: $(SULLY) + @$(SULLY) > /tmp/test_sully.c + @printf '$(GREY)Output of the $(GOLD)Sully$(RESET)\n' + @bat -plc /tmp/test_sully.c + @printf '\n$(GREY)Here's the diff between $(GOLD)$(SRC_SULLY) $(GREY)and $(GOLD)/tmp/test_sully.c$(RESET)\n' + @diff $(SRC_SULLY) /tmp/test_sully | bat -ldiff + # Header header: @printf '\n\n' @@ -104,7 +129,7 @@ header: @printf '$(GOLD) ****** ******* ****** $(END)\n' @printf '$(GOLD) ****** $(END)\n' @printf '$(GOLD) ****** $(END)\n' - @printf '$(GREY) Made by glaruell & rparodi$(END)\n\n' + @printf '$(GREY) Made by rparodi$(END)\n\n' # Footer footer: