forked from splatlab/mantis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
83 lines (62 loc) · 2.54 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
72
73
74
75
76
77
78
79
80
81
82
83
TARGETS= mantis
ifdef D
DEBUG=-g -DDEBUG
OPT=
else
DEBUG=
OPT=-Ofast
endif
ifdef NH
ARCH=
else
ARCH=-msse4.2 -D__SSE4_2_
endif
ifdef P
PROFILE=-pg -no-pie # for bug in gprof.
endif
CXX = g++ -std=c++11
CC = gcc -std=gnu11
LD= g++ -std=c++11
LOC_INCLUDE=include
LOC_SRC=src
OBJDIR=obj
CXXFLAGS += -Wall $(DEBUG) $(PROFILE) $(OPT) $(ARCH) -m64 -I. -I$(LOC_INCLUDE) \
-Wno-unused-result -Wno-strict-aliasing -Wno-unused-function -Wno-sign-compare
CFLAGS += -Wall $(DEBUG) $(PROFILE) $(OPT) $(ARCH) -m64 -I. -I$(LOC_INCLUDE)\
-Wno-unused-result -Wno-strict-aliasing -Wno-unused-function -Wno-sign-compare \
-Wno-implicit-function-declaration
LDFLAGS += $(DEBUG) $(PROFILE) $(OPT) -lsdsl -lpthread -lboost_system \
-lboost_thread -lm -lz -lrt
#
# declaration of dependencies
#
all: $(TARGETS)
# dependencies between programs and .o files
mantis: $(OBJDIR)/kmer.o $(OBJDIR)/mantis.o $(OBJDIR)/validatemantis.o $(OBJDIR)/gqf.o $(OBJDIR)/hashutil.o $(OBJDIR)/query.o $(OBJDIR)/coloreddbg.o $(OBJDIR)/bitvector.o $(OBJDIR)/util.o $(OBJDIR)/MantisFS.o
# dependencies between .o files and .h files
$(OBJDIR)/mantis.o: $(LOC_SRC)/mantis.cc
$(OBJDIR)/MantisFs.o: $(LOC_SRC)/MantisFS.cc $(LOC_INCLUDE)/MantisFS.h
$(OBJDIR)/util.o: $(LOC_SRC)/util.cc $(LOC_INCLUDE)/util.h
$(OBJDIR)/bitvector.o: $(LOC_SRC)/bitvector.cc $(LOC_INCLUDE)/bitvector.h
$(OBJDIR)/kmer.o: $(LOC_SRC)/kmer.cc $(LOC_INCLUDE)/kmer.h
$(OBJDIR)/coloreddbg.o: $(LOC_INCLUDE)/cqf/gqf.h $(LOC_INCLUDE)/hashutil.h $(LOC_INCLUDE)/util.h $(LOC_INCLUDE)/coloreddbg.h $(LOC_INCLUDE)/bitvector.h $(LOC_INCLUDE)/cqf.h
$(OBJDIR)/query.o: $(LOC_INCLUDE)/cqf/gqf.h $(LOC_INCLUDE)/hashutil.h $(LOC_INCLUDE)/util.h $(LOC_INCLUDE)/coloreddbg.h $(LOC_INCLUDE)/bitvector.h $(LOC_INCLUDE)/cqf.h $(LOC_INCLUDE)/kmer.h
$(OBJDIR)/validatemantis.o: $(LOC_INCLUDE)/cqf/gqf.h $(LOC_INCLUDE)/hashutil.h $(LOC_INCLUDE)/util.h $(LOC_INCLUDE)/coloreddbg.h $(LOC_INCLUDE)/bitvector.h $(LOC_INCLUDE)/cqf.h $(LOC_INCLUDE)/kmer.h
$(OBJDIR)/hashutil.o: $(LOC_INCLUDE)/hashutil.h
# dependencies between .o files and .cc (or .c) files
$(OBJDIR)/gqf.o: $(LOC_SRC)/cqf/gqf.c $(LOC_INCLUDE)/cqf/gqf.h
#
# generic build rules
#
$(TARGETS):
$(LD) $^ $(LDFLAGS) -o $@
$(OBJDIR)/%.o: $(LOC_SRC)/%.cc | $(OBJDIR)
$(CXX) $(CXXFLAGS) $(INCLUDE) -c -o $@ $<
$(OBJDIR)/%.o: $(LOC_SRC)/%.c | $(OBJDIR)
$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<
$(OBJDIR)/%.o: $(LOC_SRC)/cqf/%.c | $(OBJDIR)
$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<
$(OBJDIR):
@mkdir -p $(OBJDIR)
clean:
rm -f $(OBJDIR)/*.o core $(TARGETS)