| 1 |
# |
| 2 |
# Makefile |
| 3 |
# |
| 4 |
# $Id: Makefile,v 1.3 2007/11/27 18:33:59 sheneman Exp $ |
| 5 |
# |
| 6 |
# |
| 7 |
#***************************************************************************** |
| 8 |
# |
| 9 |
# Copyright (c) 2004, Luke Sheneman |
| 10 |
# All rights reserved. |
| 11 |
# |
| 12 |
# Redistribution and use in source and binary forms, with or without |
| 13 |
# modification, are permitted provided that the following conditions |
| 14 |
# are met: |
| 15 |
# |
| 16 |
# + Redistributions of source code must retain the above copyright |
| 17 |
# notice, this list of conditions and the following disclaimer. |
| 18 |
# + Redistributions in binary form must reproduce the above copyright |
| 19 |
# notice, this list of conditions and the following disclaimer in |
| 20 |
# the documentation and/or other materials provided with the |
| 21 |
# distribution. |
| 22 |
# + The names of its contributors may not be used to endorse or promote |
| 23 |
# products derived from this software without specific prior |
| 24 |
# written permission. |
| 25 |
# |
| 26 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 27 |
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 28 |
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 29 |
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 30 |
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 31 |
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 32 |
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 33 |
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 34 |
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 35 |
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 36 |
# POSSIBILITY OF SUCH DAMAGE. |
| 37 |
# |
| 38 |
#***************************************************************************** |
| 39 |
# |
| 40 |
# AUTHOR: |
| 41 |
# |
| 42 |
# Luke Sheneman |
| 43 |
# [email protected] |
| 44 |
# |
| 45 |
#***************************************************************************** |
| 46 |
|
| 47 |
|
| 48 |
# Specify your compiler here |
| 49 |
CC = gcc |
| 50 |
#CC = cc |
| 51 |
|
| 52 |
|
| 53 |
# Uncomment the following line to use the GNU getopt_long() instead |
| 54 |
# of the built-in getopt_long() |
| 55 |
|
| 56 |
#OPTFLAG = -DUSE_GNU |
| 57 |
|
| 58 |
|
| 59 |
############################# THE CFLAGS #################################### |
| 60 |
# |
| 61 |
# NOTE: The optimal selection of compiler flags is important. |
| 62 |
# Clearcut was written and developed on a Pentium 4 Linux |
| 63 |
# Computer. As such, compiler optimization flags for |
| 64 |
# recent versions of GCC on the Pentium 4 platform have been |
| 65 |
# well tested and do make a significant impact on overall |
| 66 |
# performance. |
| 67 |
# |
| 68 |
# Several alternative sets of compiler options are listed below. |
| 69 |
# Customize the compiler flags (CFLAGS) to match your target system. |
| 70 |
# |
| 71 |
|
| 72 |
|
| 73 |
######################## ALL ARCHITECTURES ################################## |
| 74 |
|
| 75 |
# DEFAULT GCC OPTIMIZATION CONFIGURATION (ALL ARCHITECTURES) |
| •76 |
CFLAGS += -O3 -Wall -funroll-loops -fomit-frame-pointer |
| 77 |
|
| 78 |
# BASIC OPTIMIZATION |
| 79 |
#CFLAGS = -O3 |
| 80 |
|
| 81 |
######################## INTEL PENTIUM OPTIMIZATIONS ######################## |
| 82 |
|
| 83 |
# PENTIUM 4 w/SSE GCC OPTIMIZATIONS. REQUIRES GCC >= 3.2 |
| 84 |
#CFLAGS = -O3 -funroll-loops -march=pentium4 -mcpu=pentium4 -mfpmath=sse -ffast-math -momit-leaf-frame-pointer |
| 85 |
|
| 86 |
# GENERIC i686 OPTIMIZATIONS GCC OPTIMIZATIONS |
| 87 |
#CFLAGS = -O3 -funroll-loops -march=i686 -mcpu=i686 -fomit-frame-pointer |
| 88 |
|
| 89 |
# GENERIC Intel C Compiler (ICC) Optimizations |
| 90 |
#CFLAGS = -O3 -axP -xP -unroll100 -IPF_fp_fast -IPF_fltacc+ -ip |
| 91 |
|
| 92 |
############################################################################# |
| 93 |
|
| 94 |
|
| 95 |
######################### POWER PC OPTIMIZATIONS ############################ |
| 96 |
|
| 97 |
# MAC OS X POWER PC OPTIMIZATIONS |
| 98 |
#CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -mcpu=powerpc -mabi=altivec -mtune=powerpc -maltivec |
| 99 |
|
| 100 |
############################################################################# |
| 101 |
|
| 102 |
|
| 103 |
# DEBUGGING COMPILER FLAGS |
| 104 |
#CFLAGS = -g3 |
| 105 |
|
| 106 |
|
| 107 |
INCDIRS = -I /usr/local/include |
| 108 |
DEPEND = makedepend |
| 109 |
|
| 110 |
# *** THE LINK FLAGS *** |
| 111 |
#LINKFLAGS = -O3 |
| 112 |
LIBS = -lm |
| 113 |
|
| 114 |
SRCS = clearcut.c dist.c dmat.c fasta.c cmdargs.c prng.c getopt_long.c |
| 115 |
OBJS = clearcut.o dist.o dmat.o fasta.o cmdargs.o prng.o getopt_long.o |
| 116 |
HDRS = clearcut.h dist.h dmat.h fasta.h cmdargs.h common.h dayhoff.h getopt_long.h prng.h |
| 117 |
|
| 118 |
all: clearcut |
| 119 |
|
| 120 |
clean: |
| 121 |
rm -f *.o a.out *.a clearcut |
| 122 |
|
| 123 |
.c.o: $(SRCS) $(HDRS) |
| 124 |
$(CC) -c $(INCDIRS) $(CFLAGS) $(OPTFLAG) $(DEFS) $< |
| 125 |
|
| 126 |
clearcut: $(OBJS) $(LIBOBJS) |
| •127 |
$(CC) $(LINKFLAGS) -o $@ $(OBJS) $(LIBDIRS) $(LIBS) $(LDFLAGS) |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|