summaryrefslogtreecommitdiff
path: root/sci-biology/blat/files/blat-34-fix-build-system.patch
blob: 9aca3f841315aa91e89f084b243966b0f85d0468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
--- a/blat/makefile
+++ b/blat/makefile
@@ -7,8 +7,7 @@
 O = blat.o
 
 blat: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/blat $O $(MYLIBS) $L
-	${STRIP} ${BINDIR}/blat${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/blat $O $(MYLIBS) $L
 
 all:
 	cd ../lib && ${MAKE}
--- a/gfClient/makefile
+++ b/gfClient/makefile
@@ -8,5 +8,4 @@
 X = gfClient
 
 gfClient: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/$X $O $(MYLIBS) $L
-	${STRIP} ${BINDIR}/$X${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/$X $O $(MYLIBS) $L
--- a/gfServer/makefile
+++ b/gfServer/makefile
@@ -8,8 +8,7 @@
 X = gfServer
 
 gfServer: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/$X $O $(MYLIBS) $L
-	${STRIP} ${BINDIR}/$X${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/$X $O $(MYLIBS) $L
 
 test:
 	${MKDIR} tests/output
--- a/hg/pslPretty/makefile
+++ b/hg/pslPretty/makefile
@@ -8,7 +8,7 @@
 O = pslPretty.o
 
 pslPretty: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/pslPretty $O $(MYLIBS) $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/pslPretty $O $(MYLIBS) $L
 
 test:: testRna testDnax
 
--- a/hg/pslReps/makefile
+++ b/hg/pslReps/makefile
@@ -9,7 +9,7 @@
 O = pslReps.o 
 
 pslReps: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/pslReps${EXE} $O $(MYLIBS) $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/pslReps${EXE} $O $(MYLIBS) $L
 
 lib:
 	cd ../../lib && ${MAKE}
--- a/hg/pslSort/makefile
+++ b/hg/pslSort/makefile
@@ -8,7 +8,7 @@
 O = pslSort.o
 
 pslSort: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/pslSort $O $(MYLIBS) $L
+	${CC} ${LDFLAGS} ${CFLAGS} ${LDFLAGS} -o ${BINDIR}/pslSort $O $(MYLIBS) $L
 
 
 lib:
--- a/inc/cgi_build_rules.mk
+++ b/inc/cgi_build_rules.mk
@@ -12,7 +12,6 @@
 	mv $A${EXE} ${CGI_BIN}-beta/$A
 
 strip::  compile
-	${STRIP} $A${EXE}
 	chmod g+w $A${EXE}
 	chmod a+rx $A${EXE}
 
--- a/inc/common.mk
+++ b/inc/common.mk
@@ -1,20 +1,15 @@
-CC=gcc
-ifeq (${COPT},)
-    COPT=-O
-endif
-CFLAGS=
 HG_DEFS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_${MACHTYPE}
 HG_WARN=-Wformat -Wimplicit -Wuninitialized -Wreturn-type
 HG_INC=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc
 
 # Stronger warning checks, and warnings-->errors, for libraries and CGIs:
 ifeq (darwin,$(findstring darwin,${OSTYPE}))
-    HG_WARN_ERR = -DJK_WARN -Wall -Werror -Wno-unused-variable
+    HG_WARN_ERR = -DJK_WARN -Wall -Wno-unused-variable
 else
   ifeq (solaris,$(findstring solaris,${OSTYPE}))
     HG_WARN_ERR = -DJK_WARN -Wall
   else
-    HG_WARN_ERR = -DJK_WARN -Wall -Werror
+    HG_WARN_ERR = -DJK_WARN -Wall
   endif
 endif
 # Apply the stronger checks to all code on our development machine:
@@ -36,9 +31,6 @@
     BINDIR = ${HOME}/bin/${MACHTYPE}
 endif
 MKDIR=mkdir -p
-ifeq (${STRIP},)
-   STRIP=strip
-endif
 CVS=cvs
 
 # portable naming of compiled executables: add ".exe" if compiled on 
@@ -55,6 +47,6 @@
 STRINGIFY = ${BINDIR}/stringify
 
 %.o: %.c
-	${CC} ${COPT} ${CFLAGS} ${HG_DEFS} ${HG_WARN} ${HG_INC} ${XINC} -o $@ -c $<
+	${CC} ${CPPFLAGS} ${CFLAGS} ${HG_DEFS} ${HG_WARN} ${HG_INC} ${XINC} -o $@ -c $<
 
 
--- a/jkOwnLib/makefile
+++ b/jkOwnLib/makefile
@@ -9,7 +9,7 @@
 T = ../lib/$(MACHTYPE)/jkOwnLib.a
 
 $(T): $(O) ../lib/$(MACHTYPE)
-	ar rcus $(T) $(O)
+	$(AR) rcus $(T) $(O)
 
 ../lib/$(MACHTYPE):
 	mkdir ../lib/$(MACHTYPE)
--- a/jkOwnLib/tests/freen/makefile
+++ b/jkOwnLib/tests/freen/makefile
@@ -7,5 +7,5 @@
 O = freen.o
 
 hello: freen.o
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/freen $O $(MYLIBS) $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/freen $O $(MYLIBS) $L
 
--- a/lib/makefile
+++ b/lib/makefile
@@ -32,7 +32,7 @@
 
 
 $(MACHTYPE)/jkweb.a: $(O) $(MACHTYPE)
-	ar rcus $(MACHTYPE)/jkweb.a $(O)
+	$(AR) rcus $(MACHTYPE)/jkweb.a $(O)
 
 $(MACHTYPE):
 	mkdir $(MACHTYPE)
--- a/lib/tests/makefile
+++ b/lib/tests/makefile
@@ -14,22 +14,19 @@
 	${MKDIR} output ${BIN_DIR}
 
 errCatchTest: errCatchTest.o ${MYLIBS} mkdirs
-	${CC} ${COPT} -o ${BIN_DIR}/errCatchTest errCatchTest.o ${MYLIBS} $L
-	${STRIP} ${BIN_DIR}/errCatchTest${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/errCatchTest errCatchTest.o ${MYLIBS} $L
 	${BIN_DIR}/errCatchTest secret > output/errCatch.good
 	diff expected/errCatch.good output/errCatch.good
 	${BIN_DIR}/errCatchTest bad > output/errCatch.bad
 	diff expected/errCatch.bad output/errCatch.bad
 
 htmlExpandUrlTest: htmlExpandUrlTest.o ${MYLIBS} mkdirs
-	${CC} ${COPT} -o ${BIN_DIR}/htmlExpandUrlTest htmlExpandUrlTest.o ${MYLIBS} $L
-	${STRIP} ${BIN_DIR}/htmlExpandUrlTest${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/htmlExpandUrlTest htmlExpandUrlTest.o ${MYLIBS} $L
 	${BIN_DIR}/htmlExpandUrlTest > output/htmlExpandUrlTest 2>&1
 	diff expected/htmlExpandUrlTest output/htmlExpandUrlTest
 
 htmlPageTest: htmlPageTest.o ${MYLIBS} mkdirs
-	${CC} ${COPT} -o ${BIN_DIR}/htmlPageTest htmlPageTest.o ${MYLIBS} $L
-	${STRIP} ${BIN_DIR}/htmlPageTest${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/htmlPageTest htmlPageTest.o ${MYLIBS} $L
 	${BIN_DIR}/htmlPageTest input/google.html > output/google.out
 	diff expected/google.out output/google.out
 
@@ -86,20 +83,20 @@
 	diff -b expected/$@.err output/$@.err
 
 ${BIN_DIR}/pipelineTester:  mkdirs pipelineTester.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/pipelineTester pipelineTester.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/pipelineTester pipelineTester.o ${MYLIBS} $L
 
 
 dyStringTest: ${BIN_DIR}/dyStringTester mkdirs
 	${BIN_DIR}/dyStringTester
 
 ${BIN_DIR}/dyStringTester:  mkdirs dyStringTester.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/dyStringTester dyStringTester.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/dyStringTester dyStringTester.o ${MYLIBS} $L
 
 
 mimeTests: mime1 mime2 mime3 mime4 mimeBin mime5 mimeAltHead mimeAutoBoundary mimeBlat
 
 ${BIN_DIR}/mimeTester:  mkdirs mimeTester.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/mimeTester mimeTester.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/mimeTester mimeTester.o ${MYLIBS} $L
 
 
 mime1: ${BIN_DIR}/mimeTester mkdirs
@@ -142,7 +139,7 @@
 	${BIN_DIR}/mimeTester -sizeSeries=3000
 
 ${BIN_DIR}/htmlMimeTest:  mkdirs htmlMimeTest.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/htmlMimeTest htmlMimeTest.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/htmlMimeTest htmlMimeTest.o ${MYLIBS} $L
 
 htmlMime1: ${BIN_DIR}/htmlMimeTest mkdirs
 	${BIN_DIR}/htmlMimeTest http://hgwdev.cse.ucsc.edu/cgi-bin/hgBlat input/htmlMime.txt 3490 3502 > output/$@.out
@@ -152,7 +149,7 @@
 base64Tests: base64Encode base64Decode
 
 ${BIN_DIR}/testBase64:  mkdirs testBase64.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/testBase64 testBase64.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/testBase64 testBase64.o ${MYLIBS} $L
 
 base64Encode: ${BIN_DIR}/testBase64 mkdirs
 	${BIN_DIR}/testBase64 'My Test String' > output/$@.out
@@ -167,7 +164,7 @@
 quotedPTests: quotedPEncode quotedPDecode
 
 ${BIN_DIR}/testQuotedP:  mkdirs testQuotedP.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/testQuotedP testQuotedP.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/testQuotedP testQuotedP.o ${MYLIBS} $L
 
 quotedPEncode: ${BIN_DIR}/testQuotedP mkdirs
 	${BIN_DIR}/testQuotedP 'taxes are quite high ' > output/$@.out
@@ -178,14 +175,14 @@
 	diff expected/$@.out output/$@.out
 
 ${BIN_DIR}/mimeDecodeTest:  mkdirs mimeDecodeTest.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/mimeDecodeTest mimeDecodeTest.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/mimeDecodeTest mimeDecodeTest.o ${MYLIBS} $L
 
 mimeDecodeTest: ${BIN_DIR}/mimeDecodeTest mkdirs
 	${BIN_DIR}/mimeDecodeTest -cid -autoBoundary output < input/$@.txt
 	diff expected/noName1.html output/noName1.html
 
 ${BIN_DIR}/safeTester:  mkdirs safeTester.o ${MYLIBS}
-	${CC} ${COPT} -o ${BIN_DIR}/safeTester safeTester.o ${MYLIBS} $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BIN_DIR}/safeTester safeTester.o ${MYLIBS} $L
 
 safeTest: ${BIN_DIR}/safeTester mkdirs
 	${BIN_DIR}/safeTester
--- a/makefile
+++ b/makefile
@@ -1,18 +1,18 @@
 all:
-	cd lib && ${MAKE}
-	cd jkOwnLib && ${MAKE}
-	cd blat && $(MAKE)
-	cd gfClient && $(MAKE)
-	cd gfServer && $(MAKE)
-	cd hg/pslPretty && $(MAKE)
-	cd hg/pslReps && $(MAKE)
-	cd hg/pslSort && $(MAKE)
-	cd utils/nibFrag && $(MAKE)
-	cd utils/faToNib && $(MAKE)
-	cd utils/faToTwoBit && $(MAKE)
-	cd utils/twoBitToFa && $(MAKE)
-	cd utils/twoBitInfo && $(MAKE)
-	cd webBlat && $(MAKE)
+	$(MAKE) -C lib
+	$(MAKE) -C jkOwnLib
+	$(MAKE) -C blat
+	$(MAKE) -C gfClient
+	$(MAKE) -C gfServer
+	$(MAKE) -C hg/pslPretty
+	$(MAKE) -C hg/pslReps
+	$(MAKE) -C hg/pslSort
+	$(MAKE) -C utils/nibFrag
+	$(MAKE) -C utils/faToNib
+	$(MAKE) -C utils/faToTwoBit
+	$(MAKE) -C utils/twoBitToFa
+	$(MAKE) -C utils/twoBitInfo
+	$(MAKE) -C webBlat
 
 clean:
 	rm -f */*.o */*/*.o
--- a/utils/faToNib/makefile
+++ b/utils/faToNib/makefile
@@ -8,4 +8,4 @@
 O = faToNib.o
 
 faToNib: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/faToNib $O $(MYLIBS) $L
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/faToNib $O $(MYLIBS) $L
--- a/utils/faToTwoBit/makefile
+++ b/utils/faToTwoBit/makefile
@@ -7,8 +7,7 @@
 O = faToTwoBit.o
 
 faToTwoBit: $O ${MYLIBS}
-	${CC} ${COPT} -o ${BINDIR}/faToTwoBit $O ${MYLIBS} $L
-	${STRIP} ${BINDIR}/faToTwoBit${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/faToTwoBit $O ${MYLIBS} $L
 
 clean:
 	rm -f $O
--- a/utils/nibFrag/makefile
+++ b/utils/nibFrag/makefile
@@ -4,7 +4,7 @@
 O = nibFrag.o 
 
 nibFrag: $(O)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/nibFrag $O ../../lib/$(MACHTYPE)/jkweb.a
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/nibFrag $O ../../lib/$(MACHTYPE)/jkweb.a
 
 
 
--- a/utils/twoBitInfo/makefile
+++ b/utils/twoBitInfo/makefile
@@ -7,8 +7,7 @@
 O = twoBitInfo.o
 
 twoBitInfo: $O ${MYLIBS}
-	${CC} ${COPT} -o ${BINDIR}/twoBitInfo $O ${MYLIBS} $L
-	${STRIP} ${BINDIR}/twoBitInfo${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/twoBitInfo $O ${MYLIBS} $L
 
 clean:
 	rm -f $O
--- a/utils/twoBitToFa/makefile
+++ b/utils/twoBitToFa/makefile
@@ -8,8 +8,7 @@
 O = twoBitToFa.o
 
 twoBitToFa: $O ${MYLIBS}
-	${CC} ${COPT} -o ${BINDIR}/twoBitToFa $O ${MYLIBS} $L
-	#${STRIP} ${BINDIR}/twoBitToFa${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o ${BINDIR}/twoBitToFa $O ${MYLIBS} $L
 
 clean:
 	rm -f $O
--- a/webBlat/makefile
+++ b/webBlat/makefile
@@ -7,8 +7,7 @@
 O = webBlat.o
 
 webBlat: $O ${MYLIBS}
-	${CC} ${COPT} -o webBlat $O ${MYLIBS} $L
-	${STRIP} webBlat${EXE}
+	${CC} ${LDFLAGS} ${CFLAGS} -o webBlat $O ${MYLIBS} $L
 
 installOsX: webBlat
 	cp webBlat /Library/WebServer/CGI-Executables