-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathMakefile.lib
72 lines (66 loc) · 2.04 KB
/
Makefile.lib
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
## this file describe how we build libs
ROOT?=.
##################################################
## Win32
ifneq ($(WIN32),)
MAKEFILE=-f Makefile.win CROSS=${CROSS} WIN32=1
endif
## MUSL
ifneq ($(MUSL),)
MAKEFILE=-f Makefile.win CROSS=${CROSS}
endif
## third-party lib
$(TABIX_INC) $(TABIX_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third tabix
$(EIGEN_INC) $(EIGEN_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third eigen
$(PCRE_INC) $(PCRE_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third pcre
$(GSL_INC) $(GSL_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third gsl
$(NLOPT_INC) $(NLOPT_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third nlopt
$(ZLIB_INC) $(ZLIB_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third zlib
$(BZIP2_INC) $(BZIP2_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third bzip2
$(BCF_INC) $(BCF_LIB) $(SAMTOOLS_INC) $(SAMTOOLS_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third samtools
$(RAPIDJSON_INC):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third rapidjson
$(SQLITE_INC) $(SQLITE_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third sqlite
$(ZSTD_INC) $(ZSTD_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third zstd
$(CNPY_INC) $(CNPY_LIB):
$(MAKE) $(MAKEFILE) -C $(ROOT)/third cnpy
## our libs
$(BASE_LIB):
$(MAKE) -C $(ROOT)/base $(MAKECMDGOALS)
$(BASE_LIB_DBG):
$(MAKE) -C $(ROOT)/base $(MAKECMDGOALS)
$(VCF_LIB):
$(MAKE) -C $(ROOT)/libVcf $(MAKECMDGOALS)
$(VCF_LIB_DBG):
$(MAKE) -C $(ROOT)/libVcf $(MAKECMDGOALS)
$(BGEN_LIB):
$(MAKE) -C $(ROOT)/libBgen $(MAKECMDGOALS)
$(BGEN_LIB_DBG):
$(MAKE) -C $(ROOT)/libBgen $(MAKECMDGOALS)
$(REGRESSION_LIB): $(EIGEN_INC)
$(MAKE) -C $(ROOT)/regression $(MAKECMDGOALS)
$(REGRESSION_LIB_DBG):
$(MAKE) -C $(ROOT)/regression $(MAKECMDGOALS)
$(GONCALO_LIB): $(EIGEN_INC)
$(MAKE) -C $(ROOT)/libsrc $(MAKECMDGOALS)
$(GONCALO_LIB_DBG):
$(MAKE) -C $(ROOT)/libsrc $(MAKECMDGOALS)
## rule to make lib
# to build lib, we will use reverse order
# so third party lib is build first.
reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1))
LIBS:=$(call reverse,$(LIB))
LIBS_DBG:=$(call reverse,$(LIB_DBG))
.PHONY: lib lib-dbg
lib:$(LIBS)
lib-dbg:$(LIB_DBG)