-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
44 lines (34 loc) · 1.18 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
# Bins: src/bin/*.rs -> target/debug/*
DEBUG_BINS := $(patsubst src/bin/%.rs, target/debug/%, $(wildcard src/bin/*.rs))
# Bins: src/bin/*.rs -> target/release/*
RELEASE_BINS := $(patsubst src/bin/%.rs, target/release/%, $(wildcard src/bin/*.rs))
all: $(DEBUG_BINS) $(DEBUG_LIBS) fasten/doc
release: $(RELEASE_BINS)
debug: $(DEBUG_BINS)
$(DEBUG_BINS):
cargo build
echo "Built debug binaries at target/debug"
# Rule to build release binaries
$(RELEASE_BINS):
cargo build --release
echo "Built release binaries at target/release"
# Test target: runs tests for each binary if corresponding script exists
test: $(DEBUG_BINS)
for bin in clean combine kmer metrics pe quality_filter randomize regex repair replace sample shuffle straighten trim validate sort progress mutate normalize convert inspect; do \
if [ -e ./tests/fasten_$$bin.sh ]; then \
bash ./tests/fasten_$$bin.sh; \
fi; \
done
target/doc:
cargo doc --no-deps
# Clean target: removes the target directories if they exist
clean:
if [[ -e ./target/debug ]]; then \
rm -rf ./target/debug; \
fi
if [[ -e ./target/release ]]; then \
rm -rf ./target/release; \
fi
if [[ -e ./target/doc ]]; then \
rm -rf ./target/doc; \
fi