-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
82 lines (61 loc) · 2.28 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
81
82
# Copyright (C) 2014 Andrew D. Smith
#
# Authors: Andrew D. Smith
#
# This code is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
ifndef SMITHLAB_CPP
$(error Must define SMITHLAB_CPP variable)
endif
PROGS = collapsebed countoverlaps baseliftover bedgraph_liftover expand_chains \
adjust_intervals collapse_bedgraph dataframe-euclidean-dist varyingrows \
readliftover collapse3col transpose_data_frame range_search basecomp
SOURCES = $(wildcard *.cpp)
INCLUDEDIRS = $(SMITHLAB_CPP)
## LIBS = -lgsl -lgslcblas
ifdef METHPIPE_ROOT
PROGS += tsscpgplot smoothmeth binmeth autocorr
INCLUDEDIRS += $(METHPIPE_ROOT)/src/common
endif
INCLUDEARGS = $(addprefix -I,$(INCLUDEDIRS))
CXX = g++
CXXFLAGS = -Wall -Wextra -fmessage-length=72 -std=c++17
OPTFLAGS = -O2
DEBUGFLAGS = -g
ifdef DEBUG
CXXFLAGS += $(DEBUGFLAGS)
endif
ifdef OPT
CXXFLAGS += $(OPTFLAGS)
endif
all: $(PROGS)
chain_file_utils.o: chain_file_utils.cpp chain_file_utils.hpp
$(CXX) $(CXXFLAGS) -c -o $@ $< $(INCLUDEARGS)
$(PROGS): $(addprefix $(SMITHLAB_CPP)/, GenomicRegion.o smithlab_os.o \
smithlab_utils.o OptionParser.o)
tsscpgplot smoothmeth: \
$(addprefix $(METHPIPE_ROOT)/src/common/, MethpipeFiles.o)
smoothmeth: $(addprefix $(METHPIPE_ROOT)/src/common/, TwoStateHMM.o)
reorder: $(addprefix $(SMITHLAB_CPP)/, MappedRead.o)
autocorr: $(addprefix $(METHPIPE_ROOT)/src/common/, MSite.o)
expand_chains: chain_file_utils.o
# No rule to make object bsutils.o in Methpipe, so this won't compile.
#majormethstate: $(addprefix $(METHPIPE_ROOT)/src/common/, bsutils.o)
%.o: %.cpp %.hpp
$(CXX) $(CXXFLAGS) -c -o $@ $< $(INCLUDEARGS)
%: %.cpp
$(CXX) $(CXXFLAGS) -o $@ $^ $(INCLUDEARGS) $(LIBS)
clean:
@-rm -f $(PROGS) *.o *.so *.a *~
.PHONY: clean