ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/PrimerMatch/Makefile
Revision: 1.3
Committed: Mon Oct 9 21:42:05 2006 UTC (9 years, 8 months ago) by nje01
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +11 -0 lines
Log Message:
Updates for OSX/Darwin

Line File contents
1
2 #
3 # Automaticly chose the platform based on the value of uname...
4 #
5
6 OS = $(shell uname)
7
8 ifeq ($(strip $(OS)),OSF1)
9 PLATFORM=alpha-cxx
10 endif
11
12 ifeq ($(strip $(OS)),AIX)
13 PLATFORM=aix-xlc
14 endif
15
16 ifeq ($(strip $(OS)),Linux)
17 PLATFORM=linux-gpp
18 endif
19
20 ifeq ($(strip $(OS)),CYGWIN_NT-5.1)
21 PLATFORM=cygwin-gpp
22 endif
23
24 ifeq ($(strip $(OS)),SunOS)
25 PLATFORM=sunos-CC
26 endif
27
28 ifeq ($(strip $(OS)),Darwin)
29 PLATFORM=darwin-gpp
30 endif
31
32
33
34 #
35 # Set the platform/machine that this'll be compiled on
36 #
37 # PLATFORM={alpha-cxx,alpha-gpp,linux-gpp,aix-xlc,aix-gpp,cygwin-gpp}
38 #
39
40 # PLATFORM=aix-gpp
41 # PLATFORM=aix-xlc
42 # PLATFORM=linux-gpp
43 # PLATFORM=alpha-cxx
44 # PLATFORM=alpha-gpp
45 # PLATFORM=cygwin-gpp
46 # PLATFORM=sunos-CC
47
48 ifeq ($(strip $(PLATORM)),)
49 CXX=cannot determine platform
50 endif
51
52 ifeq ($(strip $(PLATFORM)),aix-xlc)
53 CXX = xlC -+ -q64 -D_LARGE_FILES -bhalt:8 -qnolm
54 OPTIMIZE = -O -qinline -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1
55 endif
56
57 ifeq ($(strip $(PLATFORM)),aix-gpp)
58 CXX = /usr/bin/g++ -maix64 -D_LARGE_FILES
59 OPTIMIZE = -O
60 endif
61
62 ifeq ($(strip $(PLATFORM)),alpha-cxx)
63 CXX = cxx
64 OPTIMIZE = -O
65 EXTRACXXFLAGS = -DNO_STD_NAMESPACE
66 endif
67
68 ifeq ($(strip $(PLATFORM)),alpha-gpp)
69 CXX = g++
70 OPTIMIZE = -O
71 endif
72
73 ifeq ($(strip $(PLATFORM)),linux-gpp)
74 CXX = g++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
75 OPTIMIZE = -O
76 endif
77
78 ifeq ($(strip $(PLATFORM)),cygwin-gpp)
79 CXX = g++
80 OPTIMIZE = -O
81 E = .exe
82 endif
83
84 ifeq ($(strip $(PLATFORM)),sunos-CC)
85 CXX = /opt/SUNWspro/bin/CC -DSIXTYFOURBITS -xarch=v9b -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
86 OPTIMIZE = -O
87 endif
88
89 ifeq ($(strip $(PLATFORM)),darwin-gpp)
90 CXX = g++
91 OPTIMIZE = -O
92 endif
93
94 #
95 # The rest of these options should be left as is...
96 #
97
98 CXXFLAGS = $(EXTRACXXFLAGS) $(WARN) $(OPTIMIZE) $(DEBUG) $(PROFILE) $(INCLUDEPATH) $(PARAM)
99 LDFLAGS = $(EXTRALDFLAGS) $(WARN) $(OPTIMIZE) $(DEBUG) $(PROFILE) $(LIBRARYPATH) $(PARAM)
100 LDLIBS = -lm
101
102 PROGS = compress_seq$(E) primer_match$(E) pcr_match$(E)
103
104 COMPRESS_SEQ_OBJ = compress_seq.o fasta_io.o char_io.o util.o \
105 mapFile.o bufferedFile.o fileStar.o types.o
106
107 PRIMER_MATCH_OBJ = primer_match.o pattern_alignment.o keyword_tree.o \
108 shift_and.o mapFile.o bufferedFile.o char_io.o fasta_io.o util.o \
109 pattern_match.o primer_alignment.o fileStar.o types.o select.o \
110 shift_and_inexact.o exact_bases.o exact_halves.o filter_bitvec.o \
111 sts_io.o hash_table.o
112
113 PCR_MATCH_OBJ = pcr_match.o pattern_alignment.o keyword_tree.o \
114 shift_and.o mapFile.o bufferedFile.o char_io.o fasta_io.o util.o \
115 pattern_match.o primer_alignment.o fileStar.o types.o select.o \
116 shift_and_inexact.o sts_io.o exact_bases.o exact_halves.o \
117 filter_bitvec.o hash_table.o
118
119 all: $(PROGS)
120 if [ "$(PLATFORM)" != "" ]; then \
121 if [ ! -d "$(PLATFORM)" ]; then \
122 mkdir $(PLATFORM); \
123 fi; \
124 cp -f $(PROGS) $(PLATFORM); \
125 fi
126
127 compress_seq$(E): $(COMPRESS_SEQ_OBJ)
128 $(CXX) $(LDFLAGS) -o $@ $(COMPRESS_SEQ_OBJ) $(LDLIBS)
129
130 primer_match$(E): $(PRIMER_MATCH_OBJ)
131 $(CXX) $(LDFLAGS) -o $@ $(PRIMER_MATCH_OBJ) $(LDLIBS)
132
133 pcr_match$(E): $(PCR_MATCH_OBJ)
134 $(CXX) $(LDFLAGS) -o $@ $(PCR_MATCH_OBJ) $(LDLIBS)
135
136 .PHONY: depend clean realclean
137
138 depend: Makefile.d
139
140 clean:
141 - rm -f *% *~ *.o *.bak core gmon.out *% *.d *.lst *.org0 *.rpl0
142 - rm -rf cxx_repository
143 - rm -rf tempinc
144 - rm -rf test
145
146 realclean: clean
147 - rm -f $(PROGS) a.out *.exe
148
149 Makefile.d:
150 - touch Makefile.d; makedepend -- -Y -- -fMakefile.d $(SOURCES)>/dev/null 2>&1
151
152 include Makefile.d