actual decent makefile whoa
This commit is contained in:
24
Makefile
24
Makefile
@ -1,12 +1,24 @@
|
||||
CC := gcc
|
||||
CFLAGS := -Wall -Wextra -O2 -flto=auto
|
||||
CURSES := -lncursesw -ltinfow #utf8 support
|
||||
#CURSES := -lncurses -tinfo #no utf8
|
||||
CFLAGS_DEBUG := $(CFLAGS) -g
|
||||
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:
|
||||
gcc ./main.c -std=c89 -o th -lncursesw -ltinfow -Wall
|
||||
$(CC) ./main.c -o th -std=c89 $(CFLAGS) $(CURSES)
|
||||
|
||||
d:
|
||||
gcc -g -std=c89 ./main.c -o th -lncursesw -ltinfow -Wall && gdb --tui ./th
|
||||
$(CC) ./main.c -o th -std=c89 $(CFLAGS_DEBUG) $(CURSES)
|
||||
$(GDB)
|
||||
|
||||
v:
|
||||
gcc -g -std=c89 ./main.c -o th -lncurses -ltinfo -O3 && valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all --log-fd=9 9>>valgrind.log ./th
|
||||
|
||||
rel:
|
||||
gcc ./main.c -std=c89 -o th -lncursesw -ltinfow -Wall -O2 -flto
|
||||
$(CC) ./main.c -o th -std=c89 $(CFLAGS_DEBUG) $(CURSES)
|
||||
$(VALGRIND)
|
||||
|
||||
h:
|
||||
$(CC) ./main.c -o th -std=c89 $(CFLAGS_DEBUG) $(CURSES)
|
||||
$(HELGRIND)
|
||||
|
Reference in New Issue
Block a user