-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
78 lines (55 loc) · 2.38 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
include local.mk
include common.mk
DEPENDENCIES = lib/libbio/src/libbio.a
# “$() $()” is a literal space.
OS_NAME = $(shell tools/os_name.sh)
VERSION = $(subst $() $(),-,$(shell tools/git_version.sh))
DIST_TARGET_DIR = vcf2multialign-$(VERSION)
DIST_NAME_SUFFIX = $(if $(TARGET_TYPE),-$(TARGET_TYPE),)
DIST_TAR_GZ = vcf2multialign-$(VERSION)-$(OS_NAME)$(DIST_NAME_SUFFIX).tar.gz
.PHONY: all clean-all clean clean-dependencies dependencies
all: libvcf2multialign/libvcf2multialign.a \
vcf2multialign/vcf2multialign
clean-all: clean clean-dependencies clean-dist
$(MAKE) -C tests clean
clean:
$(MAKE) -C libvcf2multialign clean
$(MAKE) -C vcf2multialign clean
clean-dependencies: lib/libbio/local.mk
$(MAKE) -C lib/libbio clean-all
clean-dist:
$(RM) -rf $(DIST_TARGET_DIR)
dependencies: $(DEPENDENCIES)
dist: $(DIST_TAR_GZ)
tests: tests/coverage/index.html
libbio-tests:
$(MAKE) -C lib/libbio tests
libvcf2multialign/libvcf2multialign.a: $(DEPENDENCIES)
$(MAKE) -C libvcf2multialign
libvcf2multialign/libvcf2multialign.coverage.a: $(DEPENDENCIES)
$(MAKE) -C libvcf2multialign libvcf2multialign.coverage.a
vcf2multialign/vcf2multialign: $(DEPENDENCIES) libvcf2multialign/libvcf2multialign.a
$(MAKE) -C vcf2multialign
lib/libbio/vcfcat/vcfcat: $(DEPENDENCIES)
$(MAKE) -C lib/libbio/vcfcat
$(DIST_TAR_GZ): vcf2multialign/vcf2multialign lib/libbio/vcfcat/vcfcat
$(MKDIR) -p $(DIST_TARGET_DIR)
$(CP) vcf2multialign/vcf2multialign $(DIST_TARGET_DIR)
$(CP) lib/libbio/vcfcat/vcfcat $(DIST_TARGET_DIR)
$(CP) README.md $(DIST_TARGET_DIR)
$(CP) LICENSE $(DIST_TARGET_DIR)
$(CP) lib/cereal/LICENSE $(DIST_TARGET_DIR)/cereal-license.txt
$(CP) lib/libbio/lib/GSL/LICENSE $(DIST_TARGET_DIR)/GSL-license.txt
$(CP) lib/libbio/lib/range-v3/LICENSE.txt $(DIST_TARGET_DIR)/range-v3-license.txt
$(TAR) czf $(DIST_TAR_GZ) $(DIST_TARGET_DIR)
$(RM) -rf $(DIST_TARGET_DIR)
lib/libbio/local.mk: local.mk
$(CP) local.mk lib/libbio
lib/libbio/src/libbio.a: lib/libbio/local.mk
$(MAKE) -C lib/libbio
lib/libbio/lib/Catch2/build/src/libCatch2.a:
$(MAKE) -C lib/libbio lib/Catch2/build/src/libCatch2.a
lib/libbio/lib/rapidcheck/build/librapidcheck.a:
$(MAKE) -C lib/libbio lib/rapidcheck/build/librapidcheck.a
tests/coverage/index.html: lib/libbio/lib/Catch2/build/src/libCatch2.a lib/libbio/lib/rapidcheck/build/librapidcheck.a libvcf2multialign/libvcf2multialign.coverage.a $(DEPENDENCIES)
$(MAKE) -C tests coverage