forked from csnwc/Data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
assoc.mk
43 lines (32 loc) · 2.22 KB
/
assoc.mk
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
38
39
40
41
42
43
CC=gcc
COMMON= -Wall -Wextra -Wfloat-equal -pedantic -std=c90 -Werror
DEBUG= -g3
SANITIZE= $(COMMON) -fsanitize=undefined -fsanitize=address $(DEBUG)
VALGRIND= $(COMMON) $(DEBUG)
PRODUCTION= $(COMMON) -O3
LDLIBS =
testrealloc : assoc.h Realloc/specific.h Realloc/realloc.c testassoc.c ../../ADTs/General/general.h ../../ADTs/General/general.c
$(CC) testassoc.c Realloc/realloc.c ../../ADTs/General/general.c -o testrealloc -I./Realloc $(PRODUCTION) $(LDLIBS)
# Only build one version of testassoc2.c ...
testrealloc2 : assoc.h Realloc/specific.h Realloc/realloc.c testassoc2.c ../../ADTs/General/general.h ../../ADTs/General/general.c
$(CC) testassoc2.c Realloc/realloc.c ../../ADTs/General/general.c -o testrealloc2 -I./Realloc $(PRODUCTION) $(LDLIBS)
testrealloc_s : assoc.h Realloc/specific.h Realloc/realloc.c testassoc.c ../../ADTs/General/general.h ../../ADTs/General/general.c
$(CC) testassoc.c Realloc/realloc.c ../../ADTs/General/general.c -o testrealloc_s -I./Realloc $(SANITIZE) $(LDLIBS)
testrealloc_v : assoc.h Realloc/specific.h Realloc/realloc.c testassoc.c ../../ADTs/General/general.h ../../ADTs/General/general.c
$(CC) testassoc.c Realloc/realloc.c ../../ADTs/General/general.c -o testrealloc_v -I./Realloc $(VALGRIND) $(LDLIBS)
testcuckoo_s : assoc.h Cuckoo/specific.h Cuckoo/cuckoo.c testassoc.c ../../ADTs/General/general.h ../../ADTs/General/general.c
$(CC) testassoc.c Cuckoo/cuckoo.c ../../ADTs/General/general.c -o testcuckoo_s -I./Cuckoo $(SANITIZE) $(LDLIBS)
testcuckoo_v : assoc.h Cuckoo/specific.h Cuckoo/cuckoo.c testassoc.c ../../ADTs/General/general.h ../../ADTs/General/general.c
$(CC) testassoc.c Cuckoo/cuckoo.c ../../ADTs/General/general.c -o testcuckoo_v -I./Cuckoo $(VALGRIND) $(LDLIBS)
testcuckoo : assoc.h Cuckoo/specific.h Cuckoo/cuckoo.c testassoc.c ../../ADTs/General/general.h ../../ADTs/General/general.c
$(CC) testassoc.c Cuckoo/cuckoo.c ../../ADTs/General/general.c -o testcuckoo -I./Cuckoo $(PRODUCTION) $(LDLIBS)
clean:
rm -f testrealloc_s testrealloc_v testrealloc testcuckoo_s testcuckoo_v testcuckoo testrealloc2
basic: testrealloc_s testrealloc_v
./testrealloc_s
valgrind ./testrealloc_v
cuckoo: testcuckoo_s testcuckoo_v
./testcuckoo_s
valgrind ./testcuckoo_v
extra: testrealloc2
./testrealloc2