~ubuntu-branches/ubuntu/intrepid/primer3/intrepid

« back to all changes in this revision

Viewing changes to src/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2006-09-28 20:18:54 UTC
  • Revision ID: james.westby@ubuntu.com-20060928201854-45pwapz5e3a6d684
Tags: upstream-1.0b
ImportĀ upstreamĀ versionĀ 1.0b

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ======================================================================
 
2
# (c) Copyright 1996,1997,1998,1999,2000,2001,2004,2006 Whitehead
 
3
# Institute for Biomedical Research, Steve Rozen, and Helen Skaletsky
 
4
# All rights reserved.
 
5
 
6
# Redistribution and use in source and binary forms, with or without
 
7
# modification, are permitted provided that the following conditions are
 
8
# met:
 
9
 
10
#    * Redistributions of source code must retain the above copyright
 
11
# notice, this list of conditions and the following disclaimer.
 
12
#    * Redistributions in binary form must reproduce the above
 
13
# copyright notice, this list of conditions and the following disclaimer
 
14
# in the documentation and/or other materials provided with the
 
15
# distribution.
 
16
#    * Neither the names of the copyright holders nor contributors may
 
17
# be used to endorse or promote products derived from this software
 
18
# without specific prior written permission.
 
19
 
20
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 
21
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 
22
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 
23
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 
24
# OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 
25
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 
26
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 
27
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 
28
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
29
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
30
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
31
# ======================================================================
 
32
 
 
33
# ======================================================================
 
34
# CITING PRIMER3
 
35
 
36
# Steve Rozen and Helen J. Skaletsky (2000) Primer3 on the WWW for
 
37
# general users and for biologist programmers. In: Krawetz S, Misener S
 
38
# (eds) Bioinformatics Methods and Protocols: Methods in Molecular
 
39
# Biology. Humana Press, Totowa, NJ, pp 365-386.  Source code available
 
40
# at http://fokker.wi.mit.edu/primer3/.
 
41
# ======================================================================
 
42
 
 
43
MAX_PRIMER_LENGTH = 36
 
44
 
 
45
LDLIBS = -lm
 
46
CC      = gcc
 
47
O_OPTS  = -O2
 
48
WHITEHEAD_SPECIFIC_HACK = -include /usr/include/sys/types.h
 
49
CC_OPTS = -g -Wall -D__USE_FIXED_PROTOTYPES__ $(WHITEHEAD_SPECIFIC_HACK)
 
50
P_DEFINES = -DDPAL_MAX_ALIGN=$(MAX_PRIMER_LENGTH) -DMAX_PRIMER_LENGTH=$(MAX_PRIMER_LENGTH)
 
51
 
 
52
CFLAGS  = $(CC_OPTS) $(O_OPTS)
 
53
LDFLAGS = -g
 
54
 
 
55
# ======================================================================
 
56
# IMPORTANT: on MacOS X and some other Unix/Linux systems where
 
57
# static libraries are not routinely available, -static has to
 
58
# be removed.
 
59
LIBOPTS ='-static'
 
60
 
 
61
PRIMER_EXE = primer3_core
 
62
 
 
63
PRIMER_OBJECTS=primer3_main.o\
 
64
               primer3.o\
 
65
               oligotm.o\
 
66
               dpal_primer.o\
 
67
               format_output.o\
 
68
               boulder_input.o
 
69
 
 
70
EXES=$(PRIMER_EXE) ntdpal oligotm long_seq_tm_test
 
71
 
 
72
all: $(EXES)
 
73
 
 
74
clean:
 
75
        -rm *.o $(EXES) *~
 
76
 
 
77
$(PRIMER_EXE): $(PRIMER_OBJECTS)
 
78
        $(CC) $(LDFLAGS) -o $@ $(PRIMER_OBJECTS) $(LIBOPTS) $(LDLIBS)
 
79
 
 
80
# For use with the "testcenter" testing program (CenterLine Software
 
81
# Inc, http://www.centerline.com)
 
82
$(PRIMER_EXE).tc: $(PRIMER_OBJECTS) /usr/lib/debug/malloc.o
 
83
        proof $(CC) $(CFLAGS) -o $@ $(PRIMER_OBJECTS) $(LIBOPTS) $(LDLIBS)
 
84
 
 
85
ntdpal: ntdpal_main.o dpal.o
 
86
        $(CC) $(LDFLAGS) -o $@ ntdpal_main.o dpal.o
 
87
 
 
88
oligotm: oligotm_main.c oligotm.o
 
89
        $(CC) $(CFLAGS) -o $@ oligotm_main.c oligotm.o $(LIBOPTS) $(LDLIBS)
 
90
 
 
91
long_seq_tm_test: long_seq_tm_test_main.c oligotm.o
 
92
        $(CC) $(CFLAGS) -o $@ long_seq_tm_test_main.c oligotm.o $(LIBOPTS) $(LDLIBS)
 
93
 
 
94
boulder_input.o: boulder_input.c boulder_input.h primer3.h primer3_release.h dpal.h
 
95
        $(CC) -c $(CFLAGS) $(P_DEFINES) -o $@ boulder_input.c
 
96
 
 
97
dpal.o: dpal.c dpal.h primer3_release.h
 
98
        $(CC) -c $(CFLAGS) -o $@ dpal.c
 
99
 
 
100
dpal_primer.o: dpal.c dpal.h primer3_release.h
 
101
        $(CC) -c $(CFLAGS) $(P_DEFINES) -o $@ dpal.c
 
102
 
 
103
format_output.o: format_output.c primer3_release.h format_output.h primer3.h dpal.h
 
104
        $(CC) -c $(CFLAGS) $(P_DEFINES) -o $@ format_output.c
 
105
 
 
106
ntdpal_main.o: ntdpal_main.c dpal.h
 
107
        $(CC) -c $(CC_OPTS) -o $@ ntdpal_main.c
 
108
# We use CC_OPTS above rather than CFLAGS because
 
109
# gcc 2.7.2 crashes while compiling ntdpal_main.c with -O2
 
110
 
 
111
oligotm_main.o: oligotm_main.c oligotm.h
 
112
        $(CC) -c $(CFLAGS) -o $@ ntdpal_main.c
 
113
 
 
114
oligotm.o: oligotm.c oligotm.h primer3_release.h
 
115
 
 
116
primer3.o: primer3.c primer3.h primer3_release.h
 
117
        $(CC) -c $(CFLAGS) $(P_DEFINES) primer3.c
 
118
 
 
119
primer3_main.o: primer3_main.c primer3.h primer3_release.h dpal.h oligotm.h format_output.h
 
120
        $(CC) -c $(CFLAGS) $(P_DEFINES) primer3_main.c
 
121
 
 
122
primer_test: $(PRIMER_EXE)
 
123
        cd ../test; primer_test.pl