build: adding some rules for debug / bonus

This commit is contained in:
Raphael 2026-03-28 14:39:52 +01:00
parent 55871d938d
commit 1449f852c0
No known key found for this signature in database

View file

@ -84,7 +84,7 @@ $(OBJDIRNAME)/%.o: %.c
@printf '$(GREY) Compiling $(END)$(GREEN)$<$(END)\n'
@$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
bonus: CFLAGS += -D BONUS=1
bonus: CPPFLAGS += -D BONUS=1
bonus: re
# Header
@ -100,7 +100,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:
@ -118,9 +118,14 @@ footer:
@printf ' $(GREY)The compilation is$(END) $(GOLD)finish$(END)\n $(GREY)Have a good $(END)$(GOLD)correction !$(END)\n'
debug: CPPFLAGS += -D DEBUG=1 -g
# debug: CFLAGS += -fsanitize=address
debug: re
d: debug
b: bonus
db: CPPFLAGS += -D BONUS=1 -D DEBUG=1 -g
db: debug
tmux:
@tmux new-session -d -s $(NAME)
@tmux send-keys -t $(NAME):0 'vim' C-m