initial commit
[jalview.git] / forester / archive / RIO / others / phylip_mod / src / Makefile
1 # Modified by Christian Zmasek. Use at your own risk.
2 #
3 # Generic Linux/Unix Makefile for PHYLIP 3.6.
4 #
5 # You should not need to change anything, though if you want you could
6 # change the first (noncomment) statement to some directory location
7 # that might be more useful.
8 # The compressed tar archive phylip.tar.Z when uncompressed and extracted
9 # puts the source code into a directory ./src, and also makes two other
10 # directories ./exe and ./doc for the final executables and the documentation
11 # files.  Only change the EXEDIR settings if you want something different
12 # from that structure.
13 # If it causes trouble in compiling, the CFLAGS statement below may also need
14 # to be changed.
15 #
16 #  To use the PHYLIP v3.6 Makefile, type
17 #      make install       to compile the whole package and install
18 #                           the executables in $(EXEDIR), and then
19 #                           remove the object files to save space
20 #      make all           to compile the whole package but not install it
21 #                           or remove the object files
22 #      make put           to move the executables into $(EXEDIR)
23 #      make clean         to remove all object files and executables from the
24 #                           current directory
25 #      make dnaml         to compile and link one program, (in this example,
26 #                           DnaML) and leave the executable and object files
27 #                           in the current directory (where the source code is).
28 #                           You will have to move the executable in to the
29 #                           executables directory (e.g. "mv dnaml ../exe")
30 #                           Note that the program name should be lower case.
31
32 # ----------------------------------------------------------------------------
33 #  (Starting here is the section where you may want to change things)
34 # ----------------------------------------------------------------------------
35 #
36 # these are the statements we have been talking about:
37 # one of the reasons for changing them would be to put the executables
38 # on a different file system.
39 # The default configuration is to have within the overall PHYLIP
40 # directory three subdirectories:  "src" for source code, "exe" for the
41 # executables, and "doc" for the documentation files.
42 #
43 # the following specifies the directory where the executables will be placed
44 EXEDIR  = ../exe
45 #
46 # ----------------------------------------------------------------------------
47 #
48 # In the following statements (the ones that set CFLAGS, DFLAGS, LIBS
49 # and DLIBS, CC and DC) you should make sure each is set properly.
50 # Usually this will simply involve making sure that the proper statement
51 # has no "#" as its first character and that all other possibilities
52 # have "#" for their first character.
53 #
54 # ----------------------------------------------------------------------------
55 #
56 # This is the CFLAGS statement:
57 #
58 # if these statements say "-g"  and that causes trouble, remove the "-g"
59 # if the "-lX11" does not work (X compiling not working), you may want to
60 # remove that switch or fix it.
61 #
62 # Here are some possible CFLAGS statements:
63 #
64 #
65 #A minimal one
66 #CFLAGS =
67 #
68 # A basic one for debugging
69 #CFLAGS  = -g 
70 #
71 # An optimized one for gcc
72 CFLAGS  = -O3 -fomit-frame-pointer
73 #
74 # For some serious debugging using Gnu gcc
75 #
76 #CFLAGS=-g -Wall -Wmain -Wmissing-prototypes -Wreturn-type -Wstrict-prototypes  -Wunused -Werror -Wredundant-decls -Waggregate-return -Wcast-align -Wcomment
77 #
78 # For Digital Alpha systems with Compaq Tru64 Unix
79 # (however, be aware that this may cause floating-point problems in programs
80 #  like Dnaml owing to not using IEEE floating point standards).
81 #CFLAGS = -fast
82 #
83 # ----------------------------------------------------------------------------
84 #
85 # and here are some possible DFLAGS statements:
86 #
87 # A minimal one
88 #DFLAGS  = -DX $(CFLAGS)
89 #
90 # A basic one for debugging
91 #DFLAGS  = -g -DX
92 #
93 #
94 # For Gnu C++ for runs
95 #DFLAGS  = -I/usr/X11R6/include -O3 -DX -fomit-frame-pointer
96 #
97 # For Digital Alpha systems with Compaq Tru64 Unix
98 #DFLAGS = -DX -fast 
99 #
100 # for Linux with X Windows development packages installed
101 # or for MacOS X with X Windows installed
102 DFLAGS = $(CFLAGS) -DX -I/usr/X11R6/include
103 #
104 # ----------------------------------------------------------------------------
105 #
106 # These are the libraries for the CC and DC compiles, respectively
107 #
108 LIBS    = -lm
109 #
110 # if the Xlib library for the X windowing system is somewhere
111 # unexpected, you may have to change the path /usr/X11R6/lib in this one
112 #
113 # For gcc for Linux with X windows development packages installed
114 # or for MacOS X with X windows installed
115 DLIBS= -L/usr/X11R6/lib/ -lX11 -lXaw -lXt
116 #
117 # ----------------------------------------------------------------------------
118 #
119 # The next two assignments are the invocations of the compiler for the
120 # ordinary compiles and the tree-drawing programs, CC and DC
121 #
122 # This one specifies the "cc" C compiler
123 CC        = cc $(CFLAGS)
124 #
125 #  To use GCC instead, if it is not the compiler that "cc" invokes
126 #CC        = gcc $(CFLAGS)
127 #
128 # This one specifies the "cc" C compiler for the Draw programs
129 DC        = cc $(DFLAGS)
130 #
131 # To use GCC instead, if it is not the compiler that "cc" invokes
132 #DC        = gcc $(DFLAGS)
133 #
134 # ----------------------------------------------------------------------------
135 #  (After this point there should not be any reason to change anything)
136 # ----------------------------------------------------------------------------
137 #
138 #
139 # the list of programs
140 #
141 #PROGS   =          clique consense contml contrast dnacomp dnadist \
142 #                   dnainvar dnaml dnamlk dnamove dnapars dnapenny \
143 #                   dolmove dollop dolpenny factor fitch gendist kitsch \
144 #                   mix move neighbor pars penny proml promlk protdist \
145 #                   protpars restdist restml retree seqboot treedist \
146 #                   drawgram drawtree
147                    
148 PROGS   =  consense fitch neighbor proml promlk protdist protpars seqboot                   
149                    
150 #
151 # general commands
152 #
153
154 #
155 #  The first uses a symbol you are unlikely to type.  It is the one that
156 #  is executed if you just type "make".  It tells you how to use the
157 #  Makefile.
158 #
159 a1b2c3d4:
160         @echo ""
161         @echo " To use the PHYLIP v3.6 Makefile, type"
162         @echo "     make all           to compile the whole package but not install it"
163         @echo "                          or remove the object files"
164         @echo " "
165
166 introduce:
167         @echo "Building PHYLIP based on version 3.6 - Modified by Christian Zmasek. Use at your own risk."
168
169 all:        introduce $(PROGS)
170         @echo "Finished compiling."
171         @echo ""
172
173 #install:        all put clean
174 #       @echo "Done."
175 #       @echo ""
176
177 #put:
178 #       @echo "Installing PHYLIP v3.6 binaries in $(EXEDIR)"
179 #       @mkdir -p $(EXEDIR)
180 #       @cp $(PROGS) $(EXEDIR)
181 #       @echo "Installing font files in $(EXEDIR)"
182 #       @cp font* $(EXEDIR)
183 #       @echo "Finished installation."
184 #       @echo ""
185
186 #clean:
187 #       @echo "Removing object files to save space"
188 #       @rm -f *.o
189 #       @echo "Finished removing object files.  Now will remove"
190 #       @echo "executable files from the current directory, but not from the"
191 #       @echo "executables directory.  (If some are not here, the makefile"
192 #       @echo "will terminate with an error message but this is not a problem)"
193 #       @echo ""
194 #       @echo "Removing executables from this directory"
195 #       @rm -f $(PROGS)
196 #       @echo "Finished cleanup."
197 #       @echo ""
198
199 #
200 # compile the shared stuff
201 #
202
203 phylip.o:     phylip.c phylip.h
204         $(CC) -c phylip.c
205
206 seq.o:        seq.c phylip.h seq.h
207         $(CC) -c seq.c
208
209 #disc.o:   disc.c phylip.h disc.h
210 #       $(CC) -c disc.c
211
212 #discrete.o:        discrete.c discrete.h phylip.h
213 #       $(CC) -c discrete.c
214
215 #dollo.o:        dollo.c phylip.h dollo.h
216 #       $(CC) -c dollo.c
217
218 #wagner.o:        wagner.c phylip.h wagner.h
219 #       $(CC) -c wagner.c
220
221 dist.o:   dist.c phylip.h dist.h
222         $(CC) -c dist.c
223
224 #cont.o:       cont.c cont.h phylip.h
225 #       $(CC) -c cont.c
226
227 #moves.o:   moves.c phylip.h moves.h
228 #       $(CC) -c moves.c
229
230 #
231 # compile the individual programs
232 #
233
234 #clique.o:       clique.c disc.h phylip.h
235 #       $(CC) -c clique.c
236
237 #clique:       clique.o clique.c disc.o disc.c phylip.o phylip.c disc.h phylip.h
238 #       $(CC) clique.o disc.o phylip.o $(LIBS) -o clique
239
240 cons.o:          cons.c cons.h phylip.h 
241         $(CC) -c cons.c
242
243 consense.o:     consense.c cons.h phylip.h
244         $(CC) -c consense.c
245
246 consense:     consense.o consense.c phylip.o phylip.c cons.o cons.c cons.h phylip.h
247         $(CC) consense.o cons.o phylip.o $(LIBS) -o consense
248
249 #contml.o:       contml.c cont.h phylip.h
250 #       $(CC) -c contml.c
251
252 #contml:       contml.o contml.c cont.o cont.c phylip.o phylip.c cont.h phylip.h
253 #       $(CC) contml.o cont.o phylip.o $(LIBS) -o contml
254
255 #contrast.o:       contrast.c cont.h phylip.h
256 #       $(CC) -c contrast.c
257
258 #contrast:       contrast.o contrast.c cont.o cont.c phylip.o phylip.c cont.h phylip.h
259 #       $(CC) contrast.o cont.o phylip.o $(LIBS) -o contrast
260
261 #dnacomp.o:      dnacomp.c seq.h phylip.h
262 #       $(CC) -c dnacomp.c
263
264 #dnacomp:      dnacomp.o seq.o phylip.o dnacomp.c seq.c phylip.c seq.h phylip.h
265 #       $(CC) dnacomp.o seq.o phylip.o $(LIBS) -o dnacomp
266
267 #dnadist.o:      dnadist.c seq.h phylip.h
268 #       $(CC) -c dnadist.c
269
270 #dnadist:      dnadist.o seq.o phylip.o dnadist.c seq.c phylip.c seq.h phylip.h
271 #       $(CC) dnadist.o seq.o phylip.o $(LIBS) -o dnadist
272
273 #dnainvar.o:      dnainvar.c seq.h phylip.h
274 #       $(CC) -c dnainvar.c
275
276 #dnainvar:      dnainvar.o seq.o phylip.o dnainvar.c seq.c phylip.c seq.h phylip.h
277 #       $(CC) dnainvar.o seq.o phylip.o $(LIBS) -o dnainvar
278
279 #dnaml.o:      dnaml.c seq.h phylip.h
280 #       $(CC) -c dnaml.c
281
282 #dnaml:      dnaml.o seq.o phylip.o dnaml.c seq.c phylip.c seq.h phylip.h
283 #       $(CC) dnaml.o seq.o phylip.o $(LIBS) -o dnaml
284
285 #dnamlk.o:      dnamlk.c seq.h phylip.h
286 #       $(CC) -c dnamlk.c
287
288 #dnamlk:      dnamlk.o seq.o phylip.o dnamlk.c seq.c phylip.c
289 #       $(CC) dnamlk.o seq.o phylip.o $(LIBS) -o dnamlk
290
291 #dnamove.o:      dnamove.c seq.h moves.h phylip.h
292 #       $(CC) -c dnamove.c
293
294 #dnamove:      dnamove.o seq.o moves.o phylip.o dnamove.c seq.c phylip.c seq.h phylip.h
295 #       $(CC) dnamove.o seq.o moves.o phylip.o $(LIBS) -o dnamove
296
297 #dnapenny.o:      dnapenny.c seq.h phylip.h
298 #       $(CC) -c dnapenny.c
299
300 #dnapenny:      dnapenny.o seq.o phylip.o dnapenny.c seq.c phylip.c seq.h phylip.h
301 #       $(CC) dnapenny.o seq.o phylip.o $(LIBS) -o dnapenny
302
303 #dnapars.o:      dnapars.c seq.h phylip.h
304 #       $(CC) -c dnapars.c
305
306 #dnapars:      dnapars.o seq.o phylip.o dnapars.c seq.c phylip.c seq.h phylip.h
307 #       $(CC) dnapars.o seq.o phylip.o $(LIBS) -o dnapars
308
309 #dolmove.o:       dolmove.c disc.h moves.h dollo.h phylip.h
310 #       $(CC) -c dolmove.c
311
312 #dolmove:       dolmove.o disc.o moves.o dollo.o phylip.o dolmove.c disc.c moves.c dollo.c phylip.c disc.h moves.h dollo.h phylip.h
313 #       $(CC) dolmove.o disc.o moves.o dollo.o phylip.o $(LIBS) -o dolmove
314
315 #dollop.o:       dollop.c disc.h dollo.h phylip.h
316 #       $(CC) -c dollop.c
317
318 #dollop:       dollop.o disc.o dollo.o phylip.o dollop.c disc.c dollo.c phylip.c disc.h dollo.h phylip.h
319 #       $(CC) dollop.o disc.o dollo.o phylip.o $(LIBS) -o dollop
320
321 #dolpenny.o:       dolpenny.c disc.h dollo.h phylip.h
322 #       $(CC) -c dolpenny.c
323
324 #dolpenny:       dolpenny.o disc.o dollo.o phylip.o dolpenny.c disc.c dollo.c phylip.c disc.h dollo.h phylip.h
325 #       $(CC) dolpenny.o disc.o dollo.o phylip.o $(LIBS) -o dolpenny
326
327 #draw.o:   draw.c draw.h phylip.h 
328 #       $(DC) -c draw.c
329
330 #draw2.o:   draw2.c draw.h phylip.h 
331 #       $(DC) -c draw2.c
332
333 #drawgram.o:     drawgram.c draw.h phylip.h
334 #       $(DC) -c drawgram.c
335
336 #drawgram:     drawgram.o draw.o draw2.o phylip.o drawgram.c draw.c draw2.c draw.h phylip.h
337 #       $(DC) $(DLIBS) draw.o draw2.o drawgram.o phylip.o $(LIBS) -o drawgram
338
339 #drawtree.o:     drawtree.c draw.h phylip.h
340 #       $(DC) -c drawtree.c
341
342 #drawtree:     drawtree.o draw.o draw2.o phylip.o drawtree.c draw.c draw2.c draw.h phylip.h
343 #       $(DC) $(DLIBS) draw.o draw2.o drawtree.o phylip.o $(LIBS) -o drawtree
344
345 #factor.o:       factor.c phylip.h
346 #       $(CC) -c factor.c
347
348 #factor:       factor.o phylip.o factor.c phylip.c phylip.h
349 #       $(CC) factor.o phylip.o $(LIBS) -o factor
350
351 fitch.o:        fitch.c dist.h phylip.h
352         $(CC) -c fitch.c
353
354 fitch:        fitch.o dist.o phylip.o fitch.c dist.c phylip.c dist.h phylip.h
355         $(CC) fitch.o dist.o phylip.o $(LIBS) -o fitch
356
357 #gendist.o:      gendist.c phylip.h
358 #       $(CC) -c gendist.c
359
360 #gendist:      gendist.o phylip.o gendist.c phylip.c phylip.h
361 #       $(CC) gendist.o phylip.o $(LIBS) -o gendist
362
363 #kitsch.o:        kitsch.c dist.h phylip.h
364 #       $(CC) -c kitsch.c
365
366 #kitsch:        kitsch.o dist.o phylip.o kitsch.c dist.c phylip.c dist.h phylip.h
367 #       $(CC) kitsch.o dist.o phylip.o $(LIBS) -o kitsch
368
369 #mix.o:        mix.c disc.h wagner.h phylip.h
370 #       $(CC) -c mix.c
371
372 #mix:        mix.o disc.o wagner.o phylip.o mix.c disc.c wagner.c phylip.c disc.h wagner.h phylip.h
373 #       $(CC) mix.o disc.o wagner.o phylip.o $(LIBS) -o mix
374
375 #move.o:        move.c disc.h moves.h wagner.h phylip.h
376 #       $(CC) -c move.c
377
378 #move:        move.o disc.o moves.o wagner.o phylip.o move.c disc.c moves.c wagner.c phylip.c disc.h moves.h wagner.h phylip.h
379 #       $(CC) move.o disc.o moves.o wagner.o phylip.o $(LIBS) -o move
380
381 neighbor.o:        neighbor.c dist.h phylip.h
382         $(CC) -c neighbor.c
383
384 neighbor:        neighbor.o dist.o phylip.o neighbor.c dist.c phylip.c dist.h phylip.h
385         $(CC) neighbor.o dist.o phylip.o $(LIBS) -o neighbor
386
387 #pars.o:   pars.c discrete.h phylip.h
388 #       $(CC) -c pars.c
389
390 #pars: pars.o pars.c discrete.o discrete.c phylip.o phylip.c discrete.h phylip.h
391 #       $(CC) pars.o discrete.o phylip.o $(LIBS) -o pars
392
393 #penny.o:  penny.c disc.h wagner.h phylip.h
394 #       $(CC) -c penny.c
395
396 #penny:  penny.o disc.o wagner.o phylip.o penny.c disc.c wagner.c disc.h wagner.h phylip.h
397 #       $(CC) penny.o disc.o wagner.o  phylip.o $(LIBS) -o penny
398
399 proml.o:      proml.c seq.h phylip.h
400         $(CC) -c proml.c
401
402 proml:      proml.o seq.o phylip.o proml.c seq.c phylip.c seq.h phylip.h
403         $(CC) proml.o seq.o phylip.o $(LIBS) -o proml
404
405 promlk.o:      promlk.c seq.h phylip.h
406         $(CC) -c promlk.c
407
408 promlk:      promlk.o seq.o phylip.o promlk.c seq.c phylip.c
409         $(CC) promlk.o seq.o phylip.o $(LIBS) -o promlk
410
411 protdist.o:      protdist.c seq.h phylip.h
412         $(CC) -c protdist.c
413
414 protdist:      protdist.o seq.o phylip.o protdist.c seq.c phylip.c seq.h phylip.h
415         $(CC) protdist.o seq.o phylip.o $(LIBS) -o protdist
416
417 protpars.o: protpars.c seq.h phylip.h
418         $(CC) -c protpars.c
419
420 protpars: protpars.o seq.o phylip.o protpars.c seq.c phylip.c seq.h phylip.h
421         $(CC) protpars.o seq.o phylip.o $(LIBS) -o protpars
422
423 #restdist.o: restdist.c seq.h phylip.h
424 #        $(CC) -c restdist.c
425
426 #restdist: restdist.o seq.o phylip.o restdist.c seq.c phylip.c seq.h phylip.h
427 #       $(CC) restdist.o seq.o phylip.o $(LIBS) -o restdist
428
429 #restml.o: restml.c seq.h phylip.h
430 #        $(CC) -c restml.c
431
432 #restml: restml.o seq.o phylip.o restml.c seq.c phylip.c seq.h phylip.h
433 #       $(CC) restml.o seq.o phylip.o $(LIBS) -o restml
434
435 #retree.o:       retree.c moves.h phylip.h
436 #       $(CC) -c retree.c
437
438 #retree:       retree.o moves.o phylip.o retree.c moves.c phylip.c moves.h phylip.h
439 #       $(CC) retree.o moves.o phylip.o $(LIBS) -o retree
440
441 seqboot.o:      seqboot.c phylip.h
442         $(CC) -c seqboot.c
443
444 seqboot:      seqboot.o seq.o phylip.o seqboot.c seq.c phylip.c seq.h phylip.h
445         $(CC) seqboot.o seq.o phylip.o $(LIBS) -o seqboot
446
447 #treedist.o:     treedist.c cons.h phylip.h
448 #       $(CC) -c treedist.c
449
450 #treedist:     treedist.o phylip.o cons.o
451 #       $(CC) treedist.o cons.o phylip.o $(LIBS) -o treedist