📄 makefile
字号:
## Generic Linux/Unix Makefile for PHYLIP 3.6.## You should not need to change anything, though if you want you could# change the first (noncomment) statement to some directory location# that might be more useful.# The compressed tar archive phylip.tar.Z when uncompressed and extracted# puts the source code into a directory ./src, and also makes two other# directories ./exe and ./doc for the final executables and the documentation# files. Only change the EXEDIR settings if you want something different# from that structure.# If it causes trouble in compiling, the CFLAGS statement below may also need# to be changed.## To use the PHYLIP v3.6 Makefile, type# make install to compile the whole package and install# the executables in $(EXEDIR), and then# remove the object files to save space# make all to compile the whole package but not install it# or remove the object files# make put to move the executables into $(EXEDIR)# make clean to remove all object files and executables from the# current directory# make dnaml to compile and link one program, (in this example,# DnaML) and leave the executable and object files# in the current directory (where the source code is).# You will have to move the executable in to the# executables directory (e.g. "mv dnaml ../exe")# Note that the program name should be lower case.# # ----------------------------------------------------------------------------# (Starting here is the section where you may want to change things)# ----------------------------------------------------------------------------## these are the statements we have been talking about:# one of the reasons for changing them would be to put the executables# on a different file system.# The default configuration is to have within the overall PHYLIP# directory three subdirectories: "src" for source code, "exe" for the# executables, and "doc" for the documentation files.## the following specifies the directory where the executables will be placedEXEDIR = ../exe## ----------------------------------------------------------------------------## In the following statements (the ones that set CFLAGS, DFLAGS, LIBS# and DLIBS, CC and DC) you should make sure each is set properly.# Usually this will simply involve making sure that the proper statement# has no "#" as its first character and that all other possibilities# have "#" for their first character.## ----------------------------------------------------------------------------## This is the CFLAGS statement:## if these statements say "-g" and that causes trouble, remove the "-g"# if the "-lX11" does not work (X compiling not working), you may want to# remove that switch or fix it.## Here are some possible CFLAGS statements:###A minimal oneCFLAGS =## A basic one for debugging#CFLAGS = -g ## An optimized one for gcc#CFLAGS = -O3 -fomit-frame-pointer## For some serious debugging using Gnu gcc##CFLAGS=-g -Wall -Wmain -Wmissing-prototypes -Wreturn-type -Wstrict-prototypes -Wunused -Werror -Wredundant-decls -Waggregate-return -Wcast-align -Wcomment## For Digital Alpha systems with Compaq Tru64 Unix# (however, be aware that this may cause floating-point problems in programs# like Dnaml owing to not using IEEE floating point standards).#CFLAGS = -fast## ----------------------------------------------------------------------------## and here are some possible DFLAGS statements:## A minimal one#DFLAGS = -DX $(CFLAGS)## A basic one for debugging#DFLAGS = -g -DX### For Gnu C++ for runs#DFLAGS = -I/usr/X11R6/include -O3 -DX -fomit-frame-pointer## For Digital Alpha systems with Compaq Tru64 Unix#DFLAGS = -DX -fast ## for Linux with X Windows development packages installed# or for MacOS X with X Windows installedDFLAGS = $(CFLAGS) -DX -I/usr/X11R6/include## ----------------------------------------------------------------------------## These are the libraries for the CC and DC compiles, respectively#LIBS = -lm## if the Xlib library for the X windowing system is somewhere# unexpected, you may have to change the path /usr/X11R6/lib in this one## For gcc for Linux with X windows development packages installed# or for MacOS X with X windows installedDLIBS= -L/usr/X11R6/lib/ -lX11 -lXaw -lXt## ----------------------------------------------------------------------------## The next two assignments are the invocations of the compiler for the# ordinary compiles and the tree-drawing programs, CC and DC## This one specifies the "cc" C compilerCC = cc $(CFLAGS)## To use GCC instead, if it is not the compiler that "cc" invokes#CC = gcc $(CFLAGS)## This one specifies the "cc" C compiler for the Draw programsDC = cc $(DFLAGS)## To use GCC instead, if it is not the compiler that "cc" invokes#DC = gcc $(DFLAGS)## ----------------------------------------------------------------------------# (After this point there should not be any reason to change anything)# ----------------------------------------------------------------------------### the list of programs#PROGS = clique consense contml contrast dnacomp dnadist \ dnainvar dnaml dnamlk dnamove dnapars dnapenny \ dolmove dollop dolpenny factor fitch gendist kitsch \ mix move neighbor pars penny proml promlk protdist \ protpars restdist restml retree seqboot treedist \ drawgram drawtree## general commands### The first uses a symbol you are unlikely to type. It is the one that# is executed if you just type "make". It tells you how to use the# Makefile.#a1b2c3d4: @echo "" @echo " To use the PHYLIP v3.6 Makefile, type" @echo " make install to compile the whole package and install" @echo " the executables in $(EXEDIR), and then" @echo " remove the object files to save space" @echo " make all to compile the whole package but not install it" @echo " or remove the object files" @echo " make put to move the executables into $(EXEDIR)" @echo " make clean to remove all object files and executables from the" @echo " current directory" @echo " make dnaml to compile and link one program, (in this example," @echo " DnaML) and leave the executable and object files" @echo " in the current directory (where the source code is)." @echo " You will have to move the executable into the" @echo " executables directory (e.g. "mv dnaml $(EXEDIR)")" @echo " Note that the program name should be lower case." @echo " "introduce: @echo "Building PHYLIP version 3.6"all: introduce $(PROGS) @echo "Finished compiling." @echo ""install: all put clean @echo "Done." @echo ""put: @echo "Installing PHYLIP v3.6 binaries in $(EXEDIR)" @mkdir -p $(EXEDIR) @cp $(PROGS) $(EXEDIR) @echo "Installing font files in $(EXEDIR)" @cp font* $(EXEDIR) @echo "Finished installation." @echo ""clean: @echo "Removing object files to save space" @rm -f *.o @echo "Finished removing object files. Now will remove" @echo "executable files from the current directory, but not from the" @echo "executables directory. (If some are not here, the makefile" @echo "will terminate with an error message but this is not a problem)" @echo "" @echo "Removing executables from this directory" @rm -f $(PROGS) @echo "Finished cleanup." @echo ""## compile the shared stuff#phylip.o: phylip.c phylip.h $(CC) -c phylip.cseq.o: seq.c phylip.h seq.h $(CC) -c seq.cdisc.o: disc.c phylip.h disc.h $(CC) -c disc.cdiscrete.o: discrete.c discrete.h phylip.h $(CC) -c discrete.cdollo.o: dollo.c phylip.h dollo.h $(CC) -c dollo.cwagner.o: wagner.c phylip.h wagner.h $(CC) -c wagner.cdist.o: dist.c phylip.h dist.h $(CC) -c dist.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -