build: adding rules ex1/ex2 to the Makefile

This commit is contained in:
Raphael 2026-01-30 22:18:00 +01:00
parent 9d46cee039
commit c960cd6f32
No known key found for this signature in database

View file

@ -91,6 +91,31 @@ $(OBJDIRNAME)/%.o: %.c
@printf '$(GREY) Compiling $(END)$(GREEN)$<$(END)\n' @printf '$(GREY) Compiling $(END)$(GREEN)$<$(END)\n'
@$(CC) $(CFLAGS) -c -o $@ $< @$(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
header: header:
@printf '\n\n' @printf '\n\n'
@ -104,7 +129,7 @@ header:
@printf '$(GOLD) ****** ******* ****** $(END)\n' @printf '$(GOLD) ****** ******* ****** $(END)\n'
@printf '$(GOLD) ****** $(END)\n' @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
footer: footer: