1 # Modified by Christian Zmasek. Use at your own risk.
3 # Generic Linux/Unix Makefile for PHYLIP 3.6.
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
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
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.
32 # ----------------------------------------------------------------------------
33 # (Starting here is the section where you may want to change things)
34 # ----------------------------------------------------------------------------
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.
43 # the following specifies the directory where the executables will be placed
46 # ----------------------------------------------------------------------------
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.
54 # ----------------------------------------------------------------------------
56 # This is the CFLAGS statement:
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.
62 # Here are some possible CFLAGS statements:
68 # A basic one for debugging
71 # An optimized one for gcc
72 CFLAGS = -O3 -fomit-frame-pointer
74 # For some serious debugging using Gnu gcc
76 #CFLAGS=-g -Wall -Wmain -Wmissing-prototypes -Wreturn-type -Wstrict-prototypes -Wunused -Werror -Wredundant-decls -Waggregate-return -Wcast-align -Wcomment
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).
83 # ----------------------------------------------------------------------------
85 # and here are some possible DFLAGS statements:
88 #DFLAGS = -DX $(CFLAGS)
90 # A basic one for debugging
94 # For Gnu C++ for runs
95 #DFLAGS = -I/usr/X11R6/include -O3 -DX -fomit-frame-pointer
97 # For Digital Alpha systems with Compaq Tru64 Unix
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
104 # ----------------------------------------------------------------------------
106 # These are the libraries for the CC and DC compiles, respectively
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
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
117 # ----------------------------------------------------------------------------
119 # The next two assignments are the invocations of the compiler for the
120 # ordinary compiles and the tree-drawing programs, CC and DC
122 # This one specifies the "cc" C compiler
125 # To use GCC instead, if it is not the compiler that "cc" invokes
128 # This one specifies the "cc" C compiler for the Draw programs
131 # To use GCC instead, if it is not the compiler that "cc" invokes
134 # ----------------------------------------------------------------------------
135 # (After this point there should not be any reason to change anything)
136 # ----------------------------------------------------------------------------
139 # the list of programs
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 \
148 PROGS = consense fitch neighbor proml promlk protdist protpars seqboot
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
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"
167 @echo "Building PHYLIP based on version 3.6 - Modified by Christian Zmasek. Use at your own risk."
169 all: introduce $(PROGS)
170 @echo "Finished compiling."
173 #install: all put clean
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."
187 # @echo "Removing object files to save space"
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)"
194 # @echo "Removing executables from this directory"
196 # @echo "Finished cleanup."
200 # compile the shared stuff
203 phylip.o: phylip.c phylip.h
206 seq.o: seq.c phylip.h seq.h
209 #disc.o: disc.c phylip.h disc.h
212 #discrete.o: discrete.c discrete.h phylip.h
213 # $(CC) -c discrete.c
215 #dollo.o: dollo.c phylip.h dollo.h
218 #wagner.o: wagner.c phylip.h wagner.h
221 dist.o: dist.c phylip.h dist.h
224 #cont.o: cont.c cont.h phylip.h
227 #moves.o: moves.c phylip.h moves.h
231 # compile the individual programs
234 #clique.o: clique.c disc.h phylip.h
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
240 cons.o: cons.c cons.h phylip.h
243 consense.o: consense.c cons.h phylip.h
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
249 #contml.o: contml.c cont.h phylip.h
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
255 #contrast.o: contrast.c cont.h phylip.h
256 # $(CC) -c contrast.c
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
261 #dnacomp.o: dnacomp.c seq.h phylip.h
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
267 #dnadist.o: dnadist.c seq.h phylip.h
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
273 #dnainvar.o: dnainvar.c seq.h phylip.h
274 # $(CC) -c dnainvar.c
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
279 #dnaml.o: dnaml.c seq.h phylip.h
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
285 #dnamlk.o: dnamlk.c seq.h phylip.h
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
291 #dnamove.o: dnamove.c seq.h moves.h phylip.h
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
297 #dnapenny.o: dnapenny.c seq.h phylip.h
298 # $(CC) -c dnapenny.c
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
303 #dnapars.o: dnapars.c seq.h phylip.h
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
309 #dolmove.o: dolmove.c disc.h moves.h dollo.h phylip.h
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
315 #dollop.o: dollop.c disc.h dollo.h phylip.h
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
321 #dolpenny.o: dolpenny.c disc.h dollo.h phylip.h
322 # $(CC) -c dolpenny.c
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
327 #draw.o: draw.c draw.h phylip.h
330 #draw2.o: draw2.c draw.h phylip.h
333 #drawgram.o: drawgram.c draw.h phylip.h
334 # $(DC) -c drawgram.c
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
339 #drawtree.o: drawtree.c draw.h phylip.h
340 # $(DC) -c drawtree.c
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
345 #factor.o: factor.c phylip.h
348 #factor: factor.o phylip.o factor.c phylip.c phylip.h
349 # $(CC) factor.o phylip.o $(LIBS) -o factor
351 fitch.o: fitch.c dist.h phylip.h
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
357 #gendist.o: gendist.c phylip.h
360 #gendist: gendist.o phylip.o gendist.c phylip.c phylip.h
361 # $(CC) gendist.o phylip.o $(LIBS) -o gendist
363 #kitsch.o: kitsch.c dist.h phylip.h
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
369 #mix.o: mix.c disc.h wagner.h phylip.h
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
375 #move.o: move.c disc.h moves.h wagner.h phylip.h
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
381 neighbor.o: neighbor.c dist.h phylip.h
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
387 #pars.o: pars.c discrete.h phylip.h
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
393 #penny.o: penny.c disc.h wagner.h phylip.h
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
399 proml.o: proml.c seq.h phylip.h
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
405 promlk.o: promlk.c seq.h phylip.h
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
411 protdist.o: protdist.c seq.h phylip.h
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
417 protpars.o: protpars.c seq.h phylip.h
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
423 #restdist.o: restdist.c seq.h phylip.h
424 # $(CC) -c restdist.c
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
429 #restml.o: restml.c seq.h phylip.h
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
435 #retree.o: retree.c moves.h phylip.h
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
441 seqboot.o: seqboot.c phylip.h
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
447 #treedist.o: treedist.c cons.h phylip.h
448 # $(CC) -c treedist.c
450 #treedist: treedist.o phylip.o cons.o
451 # $(CC) treedist.o cons.o phylip.o $(LIBS) -o treedist