-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
80 lines (58 loc) · 2.53 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
79
80
prefix=$(shell pwd)
CXX=g++
C++FLAGS=-Wall -Werror -pedantic --std=c++11 -I. -pthread
DEBUG_OR_OPTIMIZE = -O3 -DDEBUG
#DEBUG_OR_OPTIMIZE = -ggdb -DDEBUG
DISABLE_WARNINGS = -Wno-variadic-macros -Wno-unused-local-typedefs -Wno-enum-compare -Wno-unused-result
C++SOURCES=$(wildcard src/*.cpp)
C++OBJ=$(subst src/,obj/,$(C++SOURCES))
C++OBJ:=$(C++OBJ:.cpp=.o)
BIGWIGLIB=-lBigWig
TFMLIB=-lTFMpvalue
LIBLOC=-Llib
STATICLIB=libTFMpvalue.a
CSOURCES=bw{Read,Stats,Values,Write}.c
BUILDDIR := obj
TFMHEADER=$(wildcard lib/TFMPvalue/src/*.cpp)
TFMOBJ=$(subst lib/TFMPvalue/src/,obj/,$(TFMHEADER))
TFMOBJ:=$(TFMOBJ:.cpp=.o)
SQLITESOURCE=lib/sqlite3/sqlite3.c
SQLITEOBJ=obj/sqlite3.o
EXECUTABLE=iterativeSEM
all: directories $(EXECUTABLE)
#Make the Directories
directories:
@mkdir -p $(BUILDDIR)
test: $(EXECUTABLE)
@mkdir -p results/HNF4A/
export LD_LIBRARY_PATH="/lib/x86_64-linux-gnu:$(prefix)/lib"; \
./iterativeSEM -PWM examples/MA0114.1.pwm \
-merge_file examples/wgEncodeOpenChromDnaseHepg2Pk.narrowPeak.gz \
-big_wig examples/wgEncodeHaibTfbsHepg2Hnf4asc8987V0416101RawRep1.bigWig \
-TF_name HNF4A -output results/HNF4A/ -genome data/hg19 \
-readcache results/HNF4A/HNF4A.cache.db -verbose > results/HNF4A/1test.out 2> results/HNF4A/1err.out &
ctcf: $(EXECUTABLE)
@mkdir -p results/CTCF/
export LD_LIBRARY_PATH="/lib/x86_64-linux-gnu:$(prefix)/lib"; \
./iterativeSEM -PWM /data/data_repo/PWMs/MA0139.1.pwm \
-merge_file /data/data_repo/ENCODE/H1hESC/stem.narrowPeak.gz \
-big_wig /data/data_repo/ENCODE/H1hESC/ENCFF000RSD.bigWig \
-TF_name CTCF -output results/CTCF/ -genome data/hg19 \
-readcache results/CTCF/CTCF.cache.db -verbose > results/CTCF/1test.out 2> results/CTCF/1err.out
libexport:
@cd lib/libBigWig-master && make && mv libBigWig.so ../
@cd lib/TFM-Pvalue && make SEMCPPobj && mv libTFMpvalue.so ../
@cd lib/bowtie-1.0.0 && make && mv libbowtie.so ../
export LD_LIBRARY_PATH="/lib/x86_64-linux-gnu:/home/cmorteru/SEM_CPP/SEM_CPP/lib"
$(EXECUTABLE): $(C++OBJ) $(SQLITEOBJ)
$(CXX) $(C++FLAGS) $(DEBUG_OR_OPTIMIZE) $(LIBLOC) -o $(EXECUTABLE) $(C++OBJ) $(SQLITEOBJ) $(TFMLIB) $(BIGWIGLIB) -ldl
obj/%.o : lib/TFM-Pvalue/%.cpp
$(CXX) $(C++FLAGS) -DPROGRAM=0 $(DEBUG_OR_OPTIMIZE) $(DISABLE_WARNINGS) -c $< -o $@
obj/%.o : src/%.cpp #pre-requisite #target
$(CXX) $(C++FLAGS) $(DEBUG_OR_OPTIMIZE) $(DISABLE_WARNINGS) -c $< -o $@
obj/%.o : lib/sqlite3/%.c
gcc -Wall -Werror -pedantic $(DEBUG_OR_OPTIMIZE) $(DISABLE_WARNINGS) -c $< -o $@
clean:
rm -f obj/*.o
rm -f $(EXECUTABLE)
.PHONY: all clean lib libexport