Debian Codegraph @

makefile

raw
1 #####################################################################
2 #### Main makefile for Acedb, contig tools and Image
3 #####################################################################
4
5 # $Id: makefile,v 1.123 2007/01/17 09:40:39 edgrif Exp $
6
7
8 # don't change this, using other shells can lead to portability problems.
9 SHELL = /bin/sh
10
11
12
13 #####################################################################
14 #### ACEDB programs
15
16
17 # Make sure this is ALWAYS the first target in this makefile, the overnight and release
18 # build systems all rely on this.
19 all : libs other
20
21 #all_static : clean gnulibs libs ace other tools
22
23
24 # This target makes sure that the time stamp reported with the "-version" flag
25 # for the executables gets changed just once per make. This means that all
26 # executables produced in a single make will have the same timestamp. The
27 # timestamp code is in wnq/aceversion.c which gets archived into libfree.a,
28 # which is itself included almost all executables.
29 #
30 # The build directory is also stored in aceversion.c so we know where an
31 # executable was built.
32 #
33 VERSION_TIMESTAMP_FILE = version_timestamp_file
34 version_timestamp:
35 @chmod u+w ./wnq/aceversion.c
36 @./wtools/aceSetReleaseDir ./wnq "`pwd`/bin.$(ACEDB_MACHINE)"
37 @chmod u-w ./wnq/aceversion.c
38 @touch bin.$(ACEDB_MACHINE)/$(VERSION_TIMESTAMP_FILE)
39
40
41 # Sub categories of code, please add new stuff to one of these groups if possible
42 #
43 libs : libfree.a libtsfree.a libgraph.a libgex.a libmd5.a libgd.a libacecl.a libace.a
44
45 ACE_BIN = xace xremote tace giface taql \
46 saceserver sgifaceserver saceclient sxaceclient
47 ace : $(ACE_BIN)
48
49 ACEMBLY_BIN = makeSCF xacembly tacembly gifacemblyserver
50 acembly : libstaden.a $(ACEMBLY_BIN)
51
52 OTHER_BIN = efetch
53 other : $(OTHER_BIN)
54
55 TOOLS_BIN = makeUserPasswd acediff acediffsorted pmapace diskdump diskfix metacheck homonym tagcount
56 tools : $(TOOLS_BIN)
57
58 INSTALL_BIN = $(ACE_BIN) $(ACEMBLY_BIN) $(OTHER_BIN) $(TOOLS_BIN)
59
60 test : xtest coltest giftest boxtest md5test acelibtest
61
62 ace5 : tace5 xace5 xacembly5 tacembly5
63
64 jade : jadeserver jade2sybase
65
66 ctf : scf2ctf ctf2scf
67
68 windows: WinDist WinDotBlix
69
70 gnulibs: libraries
71
72
73 # this is a new version of the below target, I'm attempting to clean up
74 # the acedb build because we have lots of defunct targets/duplication etc.
75 # Note that each line here is a copy of the above relevant lines _in order_,
76 # now I've tidied this up please try to keep it like this.
77 #
78 libfree.a libtsfree.a libgraph.a libgex.a libmd5.a libgd.a libacecl.a libace.a libaccl.a \
79 taceclient accmd saccmd acctest acstest \
80 xace xremote tace giface taql \
81 aceserver gifaceserver aceclient xaceclient \
82 saceserver sgifaceserver saceclient sxaceclient sace_build \
83 libstaden.a makeSCF xacembly tacembly gifacemblyserver \
84 blixem blixelect jade2ace efetch gnbk gnbkclient \
85 makeUserPasswd acediff acediffsorted pmapace diskdump diskfix metacheck homonym tagcount \
86 xtest coltest giftest boxtest md5test acelibtest \
87 tace5 xace5 xacembly5 tacembly5 \
88 jadeserver jade2sybase genefeatures \
89 scf2ctf ctf2scf \
90 WinDist WinDotBlix \
91 libraries xacez\
92 clean dist bindistclean : bin-dir version_timestamp
93 @echo 'making' $@ 'for $(ACEDB_MACHINE)'
94 @cd bin.$(ACEDB_MACHINE) ; \
95 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
96 cp ../wmake/truemake ./makefile ; \
97 chmod u+w ./makefile ./deffile; touch ./makefile ./deffile; \
98 export VERSION_TIMESTAMP_FILE=$(VERSION_TIMESTAMP_FILE) ; $(MAKE) $@
99
100 # Really this should be merged with the above, all that's different is the message...
101 libfree_clean libgraph_clean libace_clean libxace_clean \
102 xace_clean tace_clean \
103 xaceclient_clean \
104 aceclient_clean aceserver_clean \
105 sace_clean \
106 xacembly_clean tacembly_clean \
107 gifacemblyserver_clean : bin-dir
108 @echo "removing `echo $@ | cut -d_ -f1` .o files for $(ACEDB_MACHINE)"
109 @cd bin.$(ACEDB_MACHINE) ; \
110 cp ../wmake/truemake ./makefile ; \
111 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
112 chmod u+w ./makefile ./deffile; touch ./makefile ./deffile; \
113 $(MAKE) $@
114
115
116 #####################################################################
117 # to install binaries,subdirectories in $ACEDB/bin
118 INSTALL_DIRS = wdoc wgf wquery wscripts wspec wtools
119
120
121 install :
122 if [ ! -d $(ACEDB)/bin ] ; then \
123 mkdir $(ACEDB)/bin; \
124 fi
125 for target in $(INSTALL_DIRS) ; do \
126 echo 'installing' $$target 'for $(ACEDB_MACHINE)' ; \
127 cp -r $$target $(ACEDB)/bin ; \
128 done
129 @cd bin.$(ACEDB_MACHINE) ; \
130 $(MAKE) "INSTALL_BIN=$(INSTALL_BIN)" install_bin ; \
131
132
133 #####################################################################
134 #### CONTIG programs
135
136 contig_all:
137 @echo ""
138 @echo " Compiling ContigC programs"
139 @echo "-------------------------------------------------"
140 $(MAKE) contig pmap fphinx fpabi openmapdb mapsub extend \
141 getascdb lastclones contasp logdb rancl randb \
142 model anytoany checkdb rmvec
143 @echo ""
144 @echo "These binaries are available :"
145 @echo ""
146 @ls -l bin.$(ACEDB_MACHINE) | grep '^-..x'
147 @echo ""
148
149 ## graphical contig programs (build libfree and libgraph beforehand)
150 contig pmap : bin-dir
151 @echo 'making' $@ 'for $(ACEDB_MACHINE)'
152 @cd bin.$(ACEDB_MACHINE) ; \
153 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
154 cp ../wmake/truemake ./makefile ; \
155 chmod u+w makefile deffile; touch makefile deffile; \
156 $(MAKE) libfree.a libgraph.a libgraphXaw.a libgd.a ; \
157 cp ../wmake/contigmake ./makefile ; \
158 chmod u+w makefile; touch makefile; \
159 $(MAKE) $@
160
161 ## text-only contig support programs
162 fphinx fpabi contig_dumpace openmapdb mapsub \
163 extend getascdb lastclones contasp \
164 logdb rancl randb model anytoany \
165 checkdb rmvec : bin-dir
166 @echo 'making' $@ 'for $(ACEDB_MACHINE)'
167 @cd bin.$(ACEDB_MACHINE) ; \
168 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
169 cp ../wmake/contigmake ./makefile ; \
170 chmod u+w makefile deffile; touch makefile deffile; \
171 $(MAKE) $@
172
173 contig_clean: bin-dir
174 @echo 'removing contigc .o files for $(ACEDB_MACHINE)'
175 @cd bin.$(ACEDB_MACHINE) ; \
176 cp ../wmake/contigmake ./makefile ; \
177 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
178 chmod u+w makefile deffile; touch makefile deffile; \
179 $(MAKE) $@
180
181
182
183 #####################################################################
184 #### IMAGE programs
185
186 image:
187 @echo ""
188 @echo " Compiling Image 3 fingerprint image analysis"
189 @echo "-------------------------------------------------"
190 $(MAKE) im3 amStep2 amStep3 amStep4 amStep5 im3conv image_configure banddiff
191 @echo ""
192 @echo "These binaries are available :"
193 @echo ""
194 @ls -l bin.$(ACEDB_MACHINE) | grep '^-..x'
195 @echo ""
196
197 ## graphical image apps (build libfree and libgraph beforehand)
198 im3 bstt : bin-dir
199 @echo 'making' $@ 'for $(ACEDB_MACHINE)' ; echo
200 @cd bin.$(ACEDB_MACHINE) ; \
201 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
202 cp ../wmake/truemake ./makefile ; \
203 chmod u+w makefile deffile; touch makefile deffile; \
204 $(MAKE) libfree.a libgraph.a libgex.a libgd.a ; \
205 cp ../wmake/im3make ./makefile ; \
206 chmod u+w makefile; touch makefile; \
207 $(MAKE) $@
208
209 ## automated analysis apps, written in C++
210 amStep2 amStep3 amStep4 amStep5 : bin-dir
211 @echo 'making' $@ 'for $(ACEDB_MACHINE)'
212 @cd bin.$(ACEDB_MACHINE) ; \
213 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
214 cp ../wmake/im3make ./makefile ; \
215 chmod u+w makefile deffile; touch makefile deffile; \
216 $(MAKE) $@
217
218 ## image utilities (build libfree.a beforehand)
219 im3conv banddiff: bin-dir
220 @echo 'making' $@ 'for $(ACEDB_MACHINE)'
221 @cd bin.$(ACEDB_MACHINE) ; \
222 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
223 cp ../wmake/truemake ./makefile ; \
224 chmod u+w makefile deffile; touch makefile deffile; \
225 $(MAKE) libfree.a ; \
226 cp ../wmake/im3make ./makefile ; \
227 chmod u+w makefile; touch makefile; \
228 $(MAKE) $@
229
230 ## configure utility - doesn't not require any libraries
231 image_configure: bin-dir
232 @cd bin.$(ACEDB_MACHINE) ; \
233 cp ../wmake/im3make ./makefile ; \
234 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
235 chmod u+w makefile deffile; touch makefile deffile; \
236 $(MAKE) $@
237
238 image_clean: bin-dir
239 @echo 'removing image .o files for $(ACEDB_MACHINE)'
240 @cd bin.$(ACEDB_MACHINE) ; \
241 cp ../wmake/im3make ./makefile ; \
242 cp ../wmake/$(ACEDB_MACHINE)_DEF ./deffile; \
243 chmod u+w makefile deffile; touch makefile deffile; \
244 $(MAKE) $@
245
246 im2: bin-dir
247 @echo 'making' $@ 'for $(ACEDB_MACHINE)' ; echo
248 @cd bin.$(ACEDB_MACHINE) ; \
249 cp ../im2src/makefile.image2 . ; \
250 chmod u+w makefile.image2 ; \
251 $(MAKE) -f makefile.image2 $@
252
253
254 #####################################################################
255 #### binary directory bin.$(ACEDB_MACHINE)
256 ####
257 #### Dependency used by all of the above targets to check that user
258 #### has set up the ACEDB_MACHINE environment variable correctly.
259 ####
260 bin-dir:
261 @if test $(ACEDB_MACHINE) ; then exit ; \
262 else \
263 echo 'To compile, please setenv ACEDB_MACHINE (now not set) to one of: ' ; \
264 cd wmake ; echo ; ls *DEF ; \
265 echo ' without the _DEF ending,' ; \
266 echo ' e.g. add in your .login file the line '; \
267 echo ' setenv ACEDB_MACHINE SUN' ; \
268 echo ' or some other machine name defined in the directory wmake.' ;\
269 echo ' Thank you' ; echo ; echo ; exit 1 ; fi
270 @if test -f wmake/$(ACEDB_MACHINE)_DEF ; then exit ; \
271 else echo 'To compile, please setenv ACEDB_MACHINE (now = $(ACEDB_MACHINE) ) to one of: ' ; \
272 cd wmake ; echo ; ls *DEF ; \
273 echo ' without the _DEF ending,' ; \
274 echo ' i.e. add in your .login file the line '; \
275 echo ' setenv ACEDB_MACHINE SUN' ; \
276 echo ' or some other machine name defined in the directory wmake.' ;\
277 echo ' Thank you' ; echo ; echo ; exit 1 ; fi
278 @if test -d bin.$(ACEDB_MACHINE) ; then exit ; \
279 else mkdir bin.$(ACEDB_MACHINE) ; fi
280
281 #####################################################################
282 #### end of makefile
283 #####################################################################