File: makefile

package info (click to toggle)
wise 2.4.1-21
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 27,140 kB
  • sloc: ansic: 276,365; makefile: 1,003; perl: 886; lex: 93; yacc: 81; sh: 24
file content (197 lines) | stat: -rw-r--r-- 5,824 bytes parent folder | download | duplicates (3)
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197



#
# This is the top level makefile for Wise2. It drives the underlying
# makefile - for normal usage you do not need to cd into the underlying
# directories.
#

#
# all is the target for the binaries in the system
#
# clean does remove all .o and .a files and moves the current
# binaries over to oldbin
#
#
#

# You may want to change these lines if you have
# a non ansi C compiler

# Change the cc line to gcc if you get compiler errors
# Most likely you have a non ANSI C compiler
# CC =  /opt/intel_cc_80/bin/icc
CC = cc

# These are the CFLAGS to use. These days Wise2 is inherently
# pthreaded, and everything is compiled with threads. However
# the main algorithms don't really take advantage of pthreads,
# it is more about making sure the libaries are thread safe


# Intel icc flags
# CFLAGS += -c  -axWK -ipo `pkg-config --cflags glib-2.0`

# alpha flags (-pthread)
# CFLAGS += -c -pthread `pkg-config --cflags glib-2.0`

# normal linux/bsd/mac flags
CFLAGS += $(CPPFLAGS) -c  `pkg-config --cflags glib-2.0`


EXTRALIBS = -lm


#
# To compile with a different version of HMMER, change the following
# lines. This is not recommended, because sean and I diverged a while
# back on indexing stratgies. At some point I will need to port the later
# HMMer into Wise2
#



HMMER_INCLUDE = ../HMMer2/
HMMER_LIBS    = ../HMMer2/
HMMER_DEFINE  = HMMER_INTERNAL

#HMMER_DEFINE = HMMER_2_1_2=1
#HMMER_INCLUDE = /nfs/disk21/birney/prog/hmmer-2.1.2/src/
#HMMER_LIBS    = /nfs/disk21/birney/prog/hmmer-2.1.2/src/


#
# You shouldn't want to change anything below this.
#

start     :
	@echo 'to make the wise2 development directory read INSTALL\n\nmake all will try to make the package\n'

boot : 
	cd bootstrap ; $(MAKE) dyc
	cd dyc ;  ../bootstrap/dyc -l *.dy 
	cd base ; ../bootstrap/dyc -n Wise2_ -l *.dy 
	@echo '\n\nDon't worry about the above errors: now make newdyc'

newdyc : 
	(cd base   ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libwisebase.a )
	(cd dyc   ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" dyc )
	@echo '\n\nNow move dyc/dyc to somewhere on your path'
	@echo 'setenv WISECONFIGDIR to wisecfg and make init followed by make all'

all      : realall
	$(MAKE) bin

realall  :
	(cd base   ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libwisebase.a )
	(cd HMMer2 ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libhmmer.a )
	(cd dynlibsrc ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libdyna.a )
	(cd dynlibsrc ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libdyna_glib.a )
	(cd external ;  $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all )
	(cd socket ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libwisesocket.a )
	(cd dnaindex ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all )
	(cd network ; $(MAKE)  CC="$(CC)" CFLAGS="$(CFLAGS)" all )
	(cd models  ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" EXTRALIBS="$(EXTRALIBS)" HMMER_DEFINE="$(HMMER_DEFINE)" HMMER_INCLUDE="$(HMMER_INCLUDE)" HMMER_LIBS="$(HMMER_LIBS)" all )

strict :
	(cd base   ; $(MAKE) CC="gcc" CFLAGS="-g -c -Wall -DNOERROR" libwisebase.a )
	(cd HMMer2 ; $(MAKE) CC="gcc" CFLAGS="-g -c -Wall" libhmmer.a )
	(cd dynlibsrc ; $(MAKE) CC="gcc" CFLAGS="-g -c -Wall" libdyna.a )
	(cd models  ; $(MAKE) CC="gcc" CFLAGS="-g -c -Wall" all )

debug :
	(cd base   ; $(MAKE) CC="cc" CFLAGS="-g -c -DNOERROR" libwisebase.a )
	(cd HMMer2 ; $(MAKE) CC="cc" CFLAGS="-g -c" libhmmer.a )
	(cd dynlibsrc ; $(MAKE) CC="cc" CFLAGS="-g -c" libdyna.a )
	(cd models  ; $(MAKE) CC="cc" CFLAGS="-g -c" all )

bin : 
	mkdir bin
	cp models/pswdb models/psw models/genewisedb models/estwisedb models/estwise models/genewise models/dba models/dnal models/promoterwise network/scanwise_server models/scanwise ./bin
	./welcome.csh

libs : 
	(cd base   ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libwisebase.a )
	(cd HMMer2 ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libhmmer.a )
	(cd dynlibsrc ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libdyna.a )
	(cd models  ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libmodel.a )

init :
	cd base ; $(MAKE) init
	cd dynlibsrc; $(MAKE) init
	cd models ; $(MAKE) init
	cd dyc ; $(MAKE) init
	cd socket ; $(MAKE) init
	cd dnaindex ; $(MAKE) init
	cd network; $(MAKE) init

clean : 
	cd external ; $(MAKE) clean
	-if test -d dynlibsrc; then cd dynlibsrc ; rm -f *.[oa]; fi
	-if test -d models; then cd models ; rm -f *.[oa]; fi
	-if test -d base; then cd base ; rm -f *.[oa]; fi
	-if test -d socket; then cd socket ; rm -f *.[oa]; fi
	-if test -d dnaindex; then cd dnaindex ; rm -f *.[oa]; fi
	-if test -d network; then cd network ; rm -f *.[oa]; fi
	-if test -d dyc; then cd dyc ; rm -f *.[oa]; fi
	-if test -d HMMer2; then cd HMMer2 ; rm -f *.[oa]; fi
	-if test -d perl; then cd perl/Wise2/libs ; rm -f *.[oa]; fi
	-if test -x perl/Wise2/Makefile; then cd perl/Wise2/ ; $(MAKE) clean; fi
	-if test -d oldbin; then rm -rf oldbin; fi
	-if test -d bin; then echo 'moving binaries to oldbin'; mv -f bin oldbin; fi


api  : libs apimake

apimake :
	cd api/include ; $(MAKE) apih
	cd api/libs ; $(MAKE) apilibs
	@echo 'Now cd into api/examples and try some out!'

perl : libs perlmake

perlmake :
	cd perl ; $(MAKE) int libs
	cd perl/Wise2 ; perl Makefile.PL
	cd perl/Wise2 ; $(MAKE) 
	@echo 'Now cd into perl/Wise2 and make install, once becoming root/perl master'

test : test_dummy

test_dummy :
	cd test ; perl testman.pl -cf ../wisecfg < short.test



removedyc :
	(cd base ; rm -f *.dy)
	(cd dynlibsrc ; rm -f *.dy)
	(cd models ; rm -f *.dy)
	rm -rf dyc
	rm -rf bootstrap

docs : realdocs

realdocs :
	(cd docs ; $(MAKE) api)
	(cd docs ; $(MAKE) progdoc )


dycdist :
	(cd base ; rm -f *.dy)
	(cd dynlibsrc ; rm -f *.dy)
	(rm -rf models)
	(rm -rf api)
	(rm -rf HMMer2)
	(rm -rf perl)
	(rm -rf test)
	(rm -rf INSTALL)
	(rm welcome.csh)
	(rm -rf example)
	(cd dyc ; rm -f *.dy)
	(rm -rf bootstrap)
	(mv -f DYNAMITE_README README)
	(mv -f makefile.dynamite makefile)
	(mv dynamite_examples examples)