forked from hasindu2008/squigulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (47 loc) · 1.56 KB
/
Makefile
File metadata and controls
63 lines (47 loc) · 1.56 KB
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
CC = gcc
CXX = g++
CPPFLAGS += -I slow5lib/include/
CFLAGS += -g -Wall -O2 -std=c99
LDFLAGS += $(LIBS) -lpthread -lz -rdynamic -lm
BUILD_DIR = build
ifeq ($(zstd),1)
LDFLAGS += -lzstd
endif
BINARY = squigulator
OBJ = $(BUILD_DIR)/main.o \
$(BUILD_DIR)/model.o \
$(BUILD_DIR)/misc.o \
$(BUILD_DIR)/sim.o \
$(BUILD_DIR)/thread.o \
PREFIX = /usr/local
VERSION = `git describe --tags`
ifdef asan
CFLAGS += -fsanitize=address -fno-omit-frame-pointer
LDFLAGS += -fsanitize=address -fno-omit-frame-pointer
endif
.PHONY: clean distclean test
$(BINARY): $(OBJ) slow5lib/lib/libslow5.a
$(CC) $(CFLAGS) $(OBJ) slow5lib/lib/libslow5.a $(LDFLAGS) -o $@
$(BUILD_DIR)/main.o: src/main.c src/misc.h src/error.h src/sq.h
$(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
$(BUILD_DIR)/model.o: src/model.c src/model.h src/misc.h
$(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
$(BUILD_DIR)/thread.o: src/thread.c
$(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
$(BUILD_DIR)/misc.o: src/misc.c
$(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
$(BUILD_DIR)/sim.o: src/sim.c src/ref.h src/misc.h
$(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
slow5lib/lib/libslow5.a:
$(MAKE) -C slow5lib zstd=$(zstd) no_simd=$(no_simd) zstd_local=$(zstd_local) lib/libslow5.a
clean:
rm -rf $(BINARY) $(BUILD_DIR)/*.o
make -C slow5lib clean
# Delete all gitignored files (but not directories)
distclean: clean
git clean -f -X
rm -rf $(BUILD_DIR)/* autom4te.cache
test: $(BINARY)
scripts/test.sh
valgrind: $(BINARY)
valgrind --leak-check=full ./squigulator test/nCoV-2019.reference.fasta -o a.blow5 -q a.fasta -n 10