summaryrefslogtreecommitdiff
blob: 39cd0762b1c1252db4afa2653385526a1be317dc (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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
 Makefile                            |    8 +++---
 scripts/Makefile                    |    6 +++-
 scripts/aln2wig/Makefile            |    8 +++---
 scripts/compileSpliceCands/Makefile |    6 ++--
 src/Makefile                        |   43 ++++++++++++++++++----------------
 5 files changed, 38 insertions(+), 33 deletions(-)

diff --git a/Makefile b/Makefile
index e23a667..64610c8 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,9 @@
 #
 
 all: 
-	cd src && ${MAKE}
-	cd scripts && ${MAKE}
+	$(MAKE) -C src
+	$(MAKE) -C scripts
 
 clean: 
-	cd src && ${MAKE} clean
-	cd scripts && ${MAKE} clean
+	$(MAKE) -C src clean
+	$(MAKE) -C scripts clean
diff --git a/scripts/Makefile b/scripts/Makefile
index 6d4dd67..ab6a885 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -1,5 +1,7 @@
 all :
-	cd aln2wig && ${MAKE}
+	$(MAKE) -C aln2wig
+	$(MAKE) -C compileSpliceCands
 
 clean : 
-	cd aln2wig && ${MAKE} clean
+	$(MAKE) -C aln2wig clean
+	$(MAKE) -C compileSpliceCands
diff --git a/scripts/aln2wig/Makefile b/scripts/aln2wig/Makefile
index 64d09f5..9752980 100644
--- a/scripts/aln2wig/Makefile
+++ b/scripts/aln2wig/Makefile
@@ -1,10 +1,10 @@
-CFLAGS := -Wall -Wno-unused-result -Wno-sign-compare -ansi -pedantic -O2 -ggdb
+CFLAGS += -Wall -Wno-unused-result -Wno-sign-compare -ansi -pedantic
 
 psl2wig : aln2wig.o
-	gcc $(CFLAGS) -o aln2wig aln2wig.o;
-	cp aln2wig ../../bin
+	$(CC) $(CFLAGS) $(LDFLAGS) -o aln2wig aln2wig.o;
+	cp aln2wig ../../bin/
 psl2wig.o : aln2wig.c
-	gcc $(CFLAGS) -c aln2wig.c
+	$(CC) $(CFLAGS) -c aln2wig.c
 
 all : psl2wig
 
diff --git a/scripts/compileSpliceCands/Makefile b/scripts/compileSpliceCands/Makefile
index cddada5..8079791 100644
--- a/scripts/compileSpliceCands/Makefile
+++ b/scripts/compileSpliceCands/Makefile
@@ -1,8 +1,8 @@
 compileSpliceCands : compileSpliceCands.o list.h list.o
-	gcc -o compileSpliceCands compileSpliceCands.o list.o;
-#	cp compileSpliceCands ../../bin
+	$(CC) $(CFLAGS) $(LDFLAGS) -o compileSpliceCands compileSpliceCands.o list.o;
+	cp compileSpliceCands ../../bin/
 compileSpliceCands.o : compileSpliceCands.c 
-	gcc -Wall -pedantic -ansi -c compileSpliceCands.c 
+	$(CC) $(CFLAGS) -Wall -pedantic -ansi -c compileSpliceCands.c 
 
 all : compileSpliceCands
 
diff --git a/src/Makefile b/src/Makefile
index 71795b6..732b953 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,8 +6,8 @@
 #          a strict signed-only usage strategy to avoid mistakes since we are not warned about this.
 #        - In the current version, the order of object files in $(OBJS) IS IMPORTANT (see lldouble.hh)
 #        
-CC	= g++
-CFLAGS := -Wall -Wno-sign-compare -ansi -pedantic -O2 ${CFLAGS} -static # -pg -DDEBUG  -g -ggdb -static
+CXX	?= g++
+CXXFLAGS += -Wall -Wno-sign-compare -ansi -pedantic # -pg -DDEBUG  -g -ggdb -static
 INCLS	= -I../include -I.
 LIBS	= # -lcwd
 OBJS	= genbank.o properties.o pp_profile.o pp_hitseq.o pp_scoring.o statemodel.o namgene.o \
@@ -18,45 +18,48 @@ TOBJS	= commontrain.o igenictrain.o introntrain.o exontrain.o utrtrain.o # conte
 PROGR	= augustus etraining consensusFinder curve2hints fastBlockSearch prepareAlign
 INFO    = cflags
 
-all: $(OBJS) $(TOBJS) $(DUMOBJS) $(PROGR) info
+all: $(OBJS) $(TOBJS) $(DUMOBJS) $(PROGR) info bin
 
 .SUFFIXES:
 .SUFFIXES: .cc .o .so
 
 .cc.o:
-	$(CC) -c $(CFLAGS) -o $@ $< $(INCLS) 
+	$(CXX) -c $(CXXFLAGS) -o $@ $< $(INCLS) 
 
-augustus: augustus.cc $(OBJS) $(DUMOBJS)
-	$(CC) $(CFLAGS) -o $@ $^ $(INCLS) $(LIBS)
+bin: $(PROGR)
+	cp $(PROGR) ../bin/
+
+augustus: augustus.o $(OBJS) $(DUMOBJS)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS)
 	cp augustus ../bin/
 
-etraining: etraining.cc $(TOBJS) $(OBJS) 
-	$(CC) $(CFLAGS) -o $@ $^ $(INCLS) $(LIBS)
+etraining: etraining.o $(TOBJS) $(OBJS) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS)
 	cp etraining ../bin/
 
-evaluate: evaluate.cc $(OBJS) $(DUMOBJS)
-	$(CC) $(CFLAGS) -o $@ $^ $(INCLS) $(LIBS)
+evaluate: evaluate.o $(OBJS) $(DUMOBJS)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS)
 
-consensusFinder: consensusFinder.cc consensus.o 
-	$(CC) $(CFLAGS) -o $@ $^ $(INCLS) $(LIBS)
+consensusFinder: consensusFinder.o consensus.o 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS)
 
-curve2hints: curve2hints.cc exon_seg.o 
-	$(CC) $(CFLAGS) -o $@ $^ $(INCLS) $(LIBS)
+curve2hints: curve2hints.o exon_seg.o 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS)
 
-fastBlockSearch: fastBlockSearch.cc pp_fastBlockSearcher.o \
+fastBlockSearch: fastBlockSearch.o pp_fastBlockSearcher.o \
 	types.o properties.o geneticcode.o pp_profile.o lldouble.o
-	$(CC) $(CFLAGS) -o $@ $^ $(INCLS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS)
 	cp fastBlockSearch ../bin/
 
-prepareAlign: pp_prepare_align.cc
-	$(CC) $(CFLAGS) -o $@ $^
+prepareAlign: pp_prepare_align.o
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
 	cp prepareAlign ../bin/
 
 info:
-	echo "$(CFLAGS)" > $(INFO)
+	echo "$(CXXFLAGS)" > $(INFO)
 
 clean:
-	rm -f $(PROGR) $(OBJS) $(DUMOBJS) $(TOBJS) consensus.o exon_seg.o pp_fastBlockSearcher.o  $(INFO) 
+	rm -f $(PROGR) $(OBJS) $(DUMOBJS) $(TOBJS) consensus.o exon_seg.o pp_fastBlockSearcher.o  $(INFO) ../bin/*
 
 tidy: clean
 	rm -f *~ *.o *.rej *.orig ../include/*~ ../include/*.orig ../include/*.rej $(INFO)