-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
72 lines (48 loc) · 1.9 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
CC = gcc
CFLAGS = -D_FILE_OFFSET_BITS=64 -O -g -Wall -Winline -std=c99 -fms-extensions -pthread
CFFLAGS = -D_FILE_OFFSET_BITS=64 -O3 -g -Wall -Winline -std=c99 -fms-extensions -pthread
##
SYSTEM?=$(shell uname -s)
MALLOC_COUNT=
MALLOC_COUNT0=
MALLOC_COUNT_FLAG=0
ifeq ($(SYSTEM),Darwin)
LFLAGS=-lm -Wno-format
else
MALLOC_COUNT=malloc_count/malloc_count.c
MALLOC_COUNT0=malloc_count/malloc_count0.c
LFLAGS= -lm -ldl
MALLOC_COUNT_FLAG=1
endif
## -ldl is required by malloc_count
#LFLAGS = -lm -ldl
##
HEADERS = *.h
CFILES = gap.c util.c io.c mergegap.c mergehm.c alphabet.c ${MALLOC_COUNT} threads.c multiround.c
CFILES0 = gap.c util.c io.c mergegap.c mergehm.c alphabet.c ${MALLOC_COUNT0} threads.c multiround.c
EXECS = gap1 gap2 gap4 unbwt
# targets not producing a file declared phony
.PHONY: all tools clean tarfile
all: $(EXECS) tools
# BWTs/LCPs merging (assertions enabled and no malloc_count: had some conflicts with -O)
gap: $(CFILES0) $(HEADERS)
$(CC) $(CFLAGS) $(CFILES0) -lm -DBSIZE=2 -DMALLOC_COUNT_FLAG=${MALLOC_COUNT_FLAG} -ogap
# fast nodebug versions of the gap algorithm
gap1: $(CFILES) $(HEADERS)
$(CC) $(CFFLAGS) $(CFILES) $(LFLAGS) -DNDEBUG -DBSIZE=1 -DMALLOC_COUNT_FLAG=${MALLOC_COUNT_FLAG} -ogap1
gap2: $(CFILES) $(HEADERS)
$(CC) $(CFFLAGS) $(CFILES) $(LFLAGS) -DNDEBUG -DBSIZE=2 -DMALLOC_COUNT_FLAG=${MALLOC_COUNT_FLAG} -ogap2
gap4: $(CFILES) $(HEADERS)
$(CC) $(CFFLAGS) $(CFILES) $(LFLAGS) -DNDEBUG -DBSIZE=4 -DMALLOC_COUNT_FLAG=${MALLOC_COUNT_FLAG} -ogap4
##
# executables in tools directory for phases 1 and 3
tools:
make -C tools
tarfile:
tar -zcf egap.tgz readme.txt eGap Makefile *.[ch] malloc_count/*.[ch]\
tools/*.[ch] tools/Makefile tools/*/*.[ch]
clean:
\rm -f $(EXECS)
make clean -C tools
remove:
\rm -f dataset/*.bwt dataset/*.lcp dataset/*.sa_bl dataset/*.sl_bl dataset/*.sa_lcp dataset/*.sa dataset/*.da_bl dataset/*.da dataset/*.size dataset/*.log