blob: 1bef6721ab9b23a627ec0c3b5402f69f8cf2df5f (
plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
all:
- (cd src; $(MAKE))
+ $(MAKE) -C src
clean:
rm -f chaos anchors order glocal utils/bin2bl mlagan utils/cstat utils/bin2mf utils/rc *~ utils/contigorder utils/getbounds utils/cextract utils/seqmerge utils/getlength utils/getoverlap utils/*~ utils/scorealign utils/scorecontigs mlagan.purify utils/getcontigpos utils/fa2xfa utils/Glue utils/dotplot utils/overlay
- (cd src; $(MAKE) clean)
+ $(MAKE) -C src clean
+
+check: all
+ (LAGAN_DIR="." ./mlagan -h || true) | grep -q version && echo "[ok]" || echo "[fail]"
--- a/src/glocal/Makefile
+++ b/src/glocal/Makefile
@@ -1,19 +1,13 @@
-CC = g++
-OPTFLAGS =
-CFLAGS = $(OPTFLAGS) -O3
-CLINKER = g++
-# LIBDIR = -L/usr/local/lib
+CXXFLAGS += -Wno-deprecated
+CPPFLAGS += -I./
+
MLIB = -lm
-INCDIR = -I./
TRGT_DIR = ../..
TRGT = glocal
OBJECTS = glocal.o io.o rightinfluence.o leftinfluence.o score.o
-.cpp.o:
- $(CC) -Wno-deprecated $(CFLAGS) $(INCDIR) -c $*.cpp
-
$(TRGT): $(OBJECTS)
- $(CLINKER) $(OPTFLAGS) $(OBJECTS) -o $(TRGT_DIR)/$(TRGT) $(MLIB)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $(TRGT_DIR)/$(TRGT) $(MLIB)
clean :
rm -f *.o ./*~ *~ core
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,54 +1,51 @@
-CC = gcc $(CFLAGS)
-CPP = g++ $(CFLAGS)
-CFLAGS = -O3 # -Wall -W
TRGT_DIR = ..
all: ../anchors ../chaos ../order ../mlagan ../prolagan ../utils/bin2mf ../utils/bin2bl ../utils/cextract ../utils/cstat ../utils/contigorder ../utils/getbounds ../utils/getlength ../utils/getoverlap ../utils/rc ../utils/seqmerge ../utils/scorealign ../utils/scorecontigs ../utils/getcontigpos ../utils/fa2xfa ../utils/Glue ../utils/dotplot ../utils/overlay
- (cd glocal; $(MAKE))
+ (cd glocal && $(MAKE))
clean:
rm -f *.o *~ utils/*~ mlagan.purify core
- (cd glocal; $(MAKE) clean)
+ (cd glocal && $(MAKE) clean)
../anchors: anchors.c skiplist.c
- $(CC) -o $(TRGT_DIR)/anchors anchors.c skiplist.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/anchors anchors.c skiplist.c
../chaos: fchaos.c thrtrie.c skiplist.c global.c translate.c mempage.c filebuffer.c
- $(CC) -o $(TRGT_DIR)/chaos fchaos.c thrtrie.c skiplist.c global.c translate.c filebuffer.c -lm -DCHAOS__FLAG
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/chaos fchaos.c thrtrie.c skiplist.c global.c translate.c filebuffer.c -lm -DCHAOS__FLAG
../order: order.c diagmatrix.c filebuffer.c
- $(CC) -o $(TRGT_DIR)/order order.c diagmatrix.c filebuffer.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/order order.c diagmatrix.c filebuffer.c
../mlagan: mlagan.c diagmatrix.c multial.c skiplist.c filebuffer.c
- $(CC) -o $(TRGT_DIR)/mlagan mlagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/mlagan mlagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG
../prolagan: prolagan.c diagmatrix.c multial.c skiplist.c filebuffer.c
- $(CC) -o $(TRGT_DIR)/prolagan prolagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/prolagan prolagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG
../utils/bin2mf: utils/bin2mf.c
- $(CC) -o $(TRGT_DIR)/utils/bin2mf utils/bin2mf.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/bin2mf utils/bin2mf.c
../utils/bin2bl: utils/bin2bl.c
- $(CC) -o $(TRGT_DIR)/utils/bin2bl utils/bin2bl.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/bin2bl utils/bin2bl.c
../utils/cextract: utils/cextract.c
- $(CC) -o $(TRGT_DIR)/utils/cextract utils/cextract.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/cextract utils/cextract.c
../utils/cstat: utils/cstat.c
- $(CC) -o $(TRGT_DIR)/utils/cstat utils/cstat.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/cstat utils/cstat.c
../utils/contigorder: utils/contigorder.c
- $(CC) -o $(TRGT_DIR)/utils/contigorder utils/contigorder.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/contigorder utils/contigorder.c
../utils/getbounds: utils/getbounds.c
- $(CC) -o $(TRGT_DIR)/utils/getbounds utils/getbounds.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getbounds utils/getbounds.c
../utils/getcontigpos: utils/getcontigpos.c
- $(CC) -o $(TRGT_DIR)/utils/getcontigpos utils/getcontigpos.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getcontigpos utils/getcontigpos.c
../utils/getlength: utils/getlength.c
- $(CC) -o $(TRGT_DIR)/utils/getlength utils/getlength.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getlength utils/getlength.c
../utils/getoverlap: utils/getoverlap.c
- $(CC) -o $(TRGT_DIR)/utils/getoverlap utils/getoverlap.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getoverlap utils/getoverlap.c
../utils/rc: utils/rc.c
- $(CC) -o $(TRGT_DIR)/utils/rc utils/rc.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/rc utils/rc.c
../utils/seqmerge: utils/seqmerge.c
- $(CC) -o $(TRGT_DIR)/utils/seqmerge utils/seqmerge.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/seqmerge utils/seqmerge.c
../utils/scorealign: utils/scorealign.c
- $(CC) -o $(TRGT_DIR)/utils/scorealign utils/scorealign.c -lm
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/scorealign utils/scorealign.c -lm
../utils/scorecontigs: utils/scorecontigs.c
- $(CC) -o $(TRGT_DIR)/utils/scorecontigs utils/scorecontigs.c -lm
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/scorecontigs utils/scorecontigs.c -lm
../utils/fa2xfa: utils/fa2xfa.c
- $(CC) -o $(TRGT_DIR)/utils/fa2xfa utils/fa2xfa.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/fa2xfa utils/fa2xfa.c
../utils/overlay: utils/overlay.c
- $(CC) -o $(TRGT_DIR)/utils/overlay utils/overlay.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/overlay utils/overlay.c
../utils/Glue: utils/Glue.cpp
- $(CPP) -o $(TRGT_DIR)/utils/Glue utils/Glue.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/Glue utils/Glue.cpp
../utils/dotplot: utils/dotplot.cpp
- $(CPP) -o $(TRGT_DIR)/utils/dotplot utils/dotplot.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/dotplot utils/dotplot.cpp
|