-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
116 lines (88 loc) · 3.16 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
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
CC= gcc
CXX= g++
CFLAGS= -g -Wall -O2 -fomit-frame-pointer #-pg
CXXFLAGS= $(CFLAGS)
YFLAGS=
DFLAGS= -DUSE_GCC -DHAVE_PHYML -DLH3_ADDON # for phyml
VERSION= 1.9.2
NJVERSION= -DTR_VERSION="\"$(VERSION)\"" -DTR_BUILD=\"`date +%d%b%Y`\"
LEX= flex
YACC= bison --yacc
FLUID= fluid
FLTKCFG= fltk-config
PROG= treebest
LIBOBJS= lex.yy.o y.tab.o read.o nj.o utils1.o subtree.o sdi.o bs_nj.o \
reroot.o task.o output.o ortho.o cut_tree.o spec.o utils2.o \
align.o filter.o aln_mask.o prob_dist.o brent.o ng86_ds.o lost.o \
tree_plot.o cpp_utils.o read_aln.o pre_cons.o simulate.o compare.o \
order.o nhx_output.o nj2.o backtrans.o phyml.o mmerge.o est_len.o \
best.o trimpoor.o
FLOBJS= flnjtree.o flnjtree_ui.o flglobal.o flworkspace.o flcallback.o
INCLUDES= -I.
LIBS= -L. -lphylotree -Lalign_lib -lalign -lm -Lphyml -lphyml
SUBDIRS= . align_lib phyml
.SUFFIXES:.c .o .cc
.c.o:
$(CC) -c $(DFLAGS) $(CFLAGS) $(INCLUDES) $< -o $@
.cc.o:
$(CXX) -c $(DFLAGS) $(CXXFLAGS) $(INCLUDES) $< -o $@
all:$(PROG)
lib-recur all-recur clean-recur install-recur:
@target=`echo $@ | sed s/-recur//`; \
wdir=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
cd $$subdir; \
$(MAKE) CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
INCLUDES="$(INCLUDES)" $$target || exit 1; \
cd $$wdir; \
done;
lib:libphylotree.a
libphylotree.a:$(LIBOBJS)
$(AR) -cru $@ $(LIBOBJS)
treebest:lib-recur main.o
$(CXX) $(CFLAGS) $(DFLAGS) main.o -o $@ $(LIBS)
fltreebest:lib-recur $(FLOBJS)
$(CXX) $(CXXFLAGS) $(DFLAGS) -o $@ $(FLOBJS) `$(FLTKCFG) --cxxflags` `$(FLTKCFG) --ldstaticflags` $(LIBS); \
$(FLTKCFG) --post $@
timeout:timeout.o
$(CC) $(CFLAGS) $(DFLAGS) timeout.o -o $@
make_ng86:make_ng86.o
$(CC) $(CFLAGS) $(DFLAGS) make_ng86.o -o $@
ng86_ds.h:make_ng86
./make_ng86 $@
ng86_ds.o:ng86_ds.h ng86_ds.c
main.o:main.c
$(CC) -c $(CFLAGS) $(DFLAGS) $(NJVERSION) main.c -o $@
tags:*.c *.cc phyml/*.c align_lib/*.c phyml/*.cc
ctags *.c *.cc *.l *.y phyml/*.c phyml/*.cc align_lib/*.c common/*.h common/*.c
treebest.pdf:treebest.texi
texi2pdf treebest.texi
y.tab.c y.tab.h:parser.y
$(YACC) -d $(YFLAGS) parser.y
lex.yy.c:parser.l
$(LEX) parser.l
order.o:algo.h
lex.yy.o:lex.yy.c y.tab.h
$(CC) -c $(DFLAGS) $(CFLAGS) lex.yy.c -o $@
y.tab.cc:y.tab.c
ln -sf y.tab.c y.tab.cc
y.tab.o:y.tab.cc
$(CXX) -c $(DFLAGS) $(CFLAGS) y.tab.cc -o $@
set:
@if [ `expr match "$(DFLAGS_SPEC)" ".*HAVE_PHYML.*"` -ne 0 ]; then echo 'yes'; fi
$(FLOBJS):flnjtree_ui.h flglobal.h
flnjtree_ui.cc flnjtree_ui.h:flnjtree_ui.fl
$(FLUID) -c flnjtree_ui.fl
package:lex.yy.c y.tab.c
@(cd ..; mv treebest treebest-$(VERSION); \
(find treebest-$(VERSION) -type f | grep -v "\.svn" | xargs tar cf -) | gzip > treebest-$(VERSION).tar.gz; \
mv treebest-$(VERSION) treebest)
clean:
rm -f gmon.out *.o a.out y.output libphylotree.a *.cp *.fn *.ky *.pg *.tp *.vr *.toc *.aux *.pdf *.log \
treebest fltreebest timeout nh2pic flnjtree_ui.cc flnjtree_ui.h make_ng86 \
treebest-*.tar.bz2 ChangeLog.bak _phyml_boot*.txt \
y.tab.cc tags common/*.o treebest-*.tar.gz *~
cleanmore:clean
rm -f ng86_ds.h lex.yy.c y.tab.*
distclean:clean-recur
rm -f ng86_ds.h lex.yy.c y.tab.*