forked from nservant/HiC-Pro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·79 lines (63 loc) · 2.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
## HiC-Pro
## Copyleft 2015,2016 Institut Curie
## Author(s): Nicolas Servant
## Contact: [email protected]
## This software is distributed without any guarantee under the terms of the BSD-3 Licence
## DO NOT EDIT THE REST OF THIS FILE!!
MK_PATH = $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
INST_SCRIPTS=$(MK_PATH)/scripts
INST_SOURCES=$(INST_SCRIPTS)/src
CONFIGURE_OUT=$(wildcard ./config-system.txt)
CONFIG_SYS=$(wildcard ./config-install.txt)
install : config_check mapbuilder readstrimming iced cp
######################################
## Config file
##
######################################
config_check:
ifneq ("$(CONFIGURE_OUT)","")
include $(CONFIGURE_OUT)
else
$(error config-system.txt file not found. Please run 'make configure' first)
endif
######################################
## Configure
##
######################################
configure:
ifneq ("$(CONFIG_SYS)","")
make -f ./scripts/install/Makefile CONFIG_SYS=$(CONFIG_SYS)
else
$(error config-install.txt file not found !)
endif
######################################
## Compile
##
######################################
## Build C++ code
mapbuilder: $(INST_SOURCES)/build_matrix.cpp
(g++ -Wall -O2 -std=c++0x -o build_matrix ${INST_SOURCES}/build_matrix.cpp; mv build_matrix ${INST_SCRIPTS})
readstrimming: $(INST_SOURCES)/cutsite_trimming.cpp
(g++ -Wall -O2 -std=c++0x -o cutsite_trimming ${INST_SOURCES}/cutsite_trimming.cpp; mv cutsite_trimming ${INST_SCRIPTS})
## Build Python lib
iced: $(INST_SOURCES)/ice_mod
runner=$(shell whoami)
@echo $(runner)
ifneq ("$(runner)","root")
@echo "Installing the iced package in --user repository"
(cp $(INST_SOURCES)/ice_mod/iced/scripts/ice ${INST_SCRIPTS}; cd $(INST_SOURCES)/ice_mod/; ${PYTHON_PATH}/python setup.py install --user;)
else
@echo "Installing the iced package as root"
(cp $(INST_SOURCES)/ice_mod/iced/scripts/ice ${INST_SCRIPTS}; cd $(INST_SOURCES)/ice_mod/; ${PYTHON_PATH}/python setup.py install;)
endif
test: config_check
@echo ${PYTHON_PATH}
######################################
## Create installed version
##
######################################
cp:
ifneq ($(realpath $(MK_PATH)), $(realpath $(INSTALL_PATH)))
cp -Ri $(MK_PATH) $(INSTALL_PATH)
endif
@echo "HiC-Pro installed in $(shell realpath $(INSTALL_PATH)) !"