1
0
mirror of https://gittea.dev/nova/th.git synced 2025-12-09 09:10:10 -05:00
Files
th/Makefile
2025-11-16 12:09:40 +01:00

28 lines
698 B
Makefile

CC := gcc
CFLAGS := -Wall -Wextra -O2 -flto=auto
CURSES := $(shell pkg-config --libs ncursesw)
CFLAGS_DEBUG := $(CFLAGS) -g
CFLAGS_PROFILE := $(CFLAGS) -pg
GDB := gdb --tui ./th
VALGRIND := valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all --log-fd=9 9>>valgrind.log ./th
HELGRIND := valgrind --tool=helgrind --log-fd=9 9>>helgrind.log ./th
all:
$(CC) ./main.c -o th -std=c89 $(CFLAGS) $(CURSES)
d:
$(CC) ./main.c -o th -std=c89 $(CFLAGS_DEBUG) $(CURSES)
$(GDB)
p:
$(CC) ./main.c -o th -std=c89 $(CFLAGS_PROFILE) $(CURSES)
v:
$(CC) ./main.c -o th -std=c89 $(CFLAGS_DEBUG) $(CURSES)
$(VALGRIND)
h:
$(CC) ./main.c -o th -std=c89 $(CFLAGS_DEBUG) $(CURSES)
$(HELGRIND)