-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
NASMFLAGS = -f elf64
CFLAGS = -O0
MAKEMAIN = -o main main.cpp
DEFSLOW = -D SLOW
DEFSPEED = -D SPEED_TEST
DEFMAINTEST = -D MAIN_TEST
CDEBUGFLAGS = -g -fsanitize=address -fsanitize=alignment -fsanitize=bool -fsanitize=bounds -fsanitize=enum -fsanitize=float-cast-overflow -fsanitize=float-divide-by-zero -fsanitize=integer-divide-by-zero -fsanitize=leak -fsanitize=nonnull-attribute -fsanitize=null -fsanitize=object-size -fsanitize=return -fsanitize=returns-nonnull-attribute -fsanitize=shift -fsanitize=signed-integer-overflow -fsanitize=undefined -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=vptr
SFMLFLAGS = -lsfml-graphics -lsfml-window -lsfml-system
all: main
get:
nasm $(NASMFLAGS) get.asm
mv get.o src
hashing:
nasm $(NASMFLAGS) hashing.asm
mv hashing.o src
main: get hashing
g++ $(CFLAGS) $(MAKEMAIN) src/hashing.o src/get.o
fast: get hashing
g++ $(CFLAGS) $(MAKEMAIN) $(DEFSPEED) src/hashing.o src/get.o
fast_debug: get hashing
g++ $(CFLAGS) $(MAKEMAIN) $(CDEBUGFLAGS) $(DEFMAINTEST) src/hashing.o src/get.o
slow:
g++ $(CFLAGS) $(MAKEMAIN) $(DEFSLOW) $(DEFSPEED)
slow_debug:
g++ $(CFLAGS) $(MAKEMAIN) $(DEFSLOW) $(CDEBUGFLAGS) $(DEFMAINTEST)
get_plot:
g++ $(CFLAGS) $(MAKEMAIN) $(DEFSLOW) -D SPEED_TEST_COUNT=30 -D PLOT
python plot.py