-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (45 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Compiler
CC = g++
OPTS = -c -Wall --std=c++17 -O3
# Project name
PROJECT = luthien
# Directories
OBJDIR = obj
SRCDIR = src
# Libraries
LIBS = -lpthread -lstdc++fs
# Files and folders
SRCS = $(shell find $(SRCDIR) -name '*.cpp')
SRCDIRS = $(shell find . -name '*.cpp' | dirname {} | sort | uniq | sed 's/\/$(SRCDIR)//g' )
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
# Targets
$(PROJECT): buildrepo $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $@
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CC) $(OPTS) -c $< -o $@
clean:
rm $(PROJECT) $(OBJDIR) -Rf
test_single1:
./luthien -i1 test/test.fastq -o1 test/output/test.fastq \
-t 2 -c 16 -b 256
test_single2:
./luthien -i1 test/big/SRR941557.fastq -o1 test/output/test2.fastq \
-t 2 -c 16 -b 256
test_paired1:
./luthien -i1 test/test.f.fastq -i2 test/test.r.fastq \
-o1 test/output/test.f.fastq -o2 test/output/test.r.fastq \
-t 2 -c 17 -b 512
test_paired2:
./luthien -i1 test/big/SRR3309317_1.mini.fastq -i2 test/big/SRR3309317_2.mini.fastq \
-o1 test/output/SRR3309317_1.mini.fastq -o2 test/output/SRR3309317_2.mini.fastq \
-t 2 -c 17 -b 512
buildrepo:
@$(call make-repo)
# Create obj directory structure
define make-repo
mkdir -p $(OBJDIR)
for dir in $(SRCDIRS); \
do \
mkdir -p $(OBJDIR)/$$dir; \
done
endef