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
|
--- a/bfp/bfp_LUSOL/ccc
+++ b/bfp/bfp_LUSOL/ccc
@@ -1,13 +1,13 @@
:
src='../../shared/commonlib.c ../../colamd/colamd.c lp_LUSOL.c ../../lp_utils.c ../../shared/myblas.c LUSOL/lusol.c'
-c=cc
+c=${CC:-cc}
#determine platform (32/64 bit)
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
--- a/bfp/bfp_LUSOL/ccc.osx
+++ b/bfp/bfp_LUSOL/ccc.osx
@@ -1,13 +1,13 @@
:
src='../../shared/commonlib.c ../../colamd/colamd.c lp_LUSOL.c ../../lp_utils.c ../../shared/myblas.c LUSOL/lusol.c'
-c=cc
+c=${CC:-cc}
#determine platform (32/64 bit)
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
--- a/demo/ccc
+++ b/demo/ccc
@@ -1,6 +1,5 @@
src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
-
+c=${CC:-cc}
math=-lm
def=
--- a/demo/ccc.osx
+++ b/demo/ccc.osx
@@ -1,5 +1,5 @@
src='../bfp/lp_MDO.c ../commonlib.c ../myblas.c ../colamd/colamd.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_etaPFI/lp_etaPFI.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c demo.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=${CC:-cc}
math=-lm
--- a/lp_solve/ccc
+++ b/lp_solve/ccc
@@ -1,6 +1,6 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=${CC:-cc}
MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
@@ -8,7 +8,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
>"$MYTMP"/platform.c
echo '#include <stdlib.h>'>>"$MYTMP"/platform.c
echo '#include <stdio.h>'>>"$MYTMP"/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
$c "$MYTMP"/platform.c -o "$MYTMP"/platform
PLATFORM=`"$MYTMP"/platform`
rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1
@@ -22,7 +22,7 @@ math=-lm
echo '#include <stdio.h>'>>"$MYTMP"/isnan.c
echo '#include <stdlib.h>'>>"$MYTMP"/isnan.c
echo '#include <math.h>'>>"$MYTMP"/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
$c "$MYTMP"/isnan.c -o "$MYTMP"/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
@@ -42,4 +42,4 @@ then opts='-O0'
else dl=-ldl
fi
-$c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $dl
+$c $CFLAGS $LDFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $dl
--- a/lp_solve/ccc.osx
+++ b/lp_solve/ccc.osx
@@ -1,6 +1,6 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=${CC:-cc}
MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
@@ -8,7 +8,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
>"$MYTMP"/platform.c
echo '#include <stdlib.h>'>>"$MYTMP"/platform.c
echo '#include <stdio.h>'>>"$MYTMP"/platform.c
-echo 'main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
+echo 'int main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
$c "$MYTMP"/platform.c -o "$MYTMP"/platform
PLATFORM=`"$MYTMP"/platform`
rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1
@@ -22,7 +22,7 @@ math=-lm
echo '#include <stdio.h>'>>"$MYTMP"/isnan.c
echo '#include <stdlib.h>'>>"$MYTMP"/isnan.c
echo '#include <math.h>'>>"$MYTMP"/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
$c "$MYTMP"/isnan.c -o "$MYTMP"/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
@@ -37,4 +37,4 @@ dl=-ldl
opts='-idirafter /usr/include/sys -O3 -DINTEGERTIME -Wno-long-double'
-$c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $dl
+$c $CFLAGS $LDFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $dl
--- a/lpsolve55/ccc
+++ b/lpsolve55/ccc
@@ -1,6 +1,6 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=${CC:-cc}
MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
@@ -8,7 +8,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
>"$MYTMP"/platform.c
echo '#include <stdlib.h>'>>"$MYTMP"/platform.c
echo '#include <stdio.h>'>>"$MYTMP"/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
$c "$MYTMP"/platform.c -o "$MYTMP"/platform
PLATFORM=`"$MYTMP"/platform`
rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1
@@ -20,7 +20,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1
echo '#include <stdio.h>'>>"$MYTMP"/isnan.c
echo '#include <stdlib.h>'>>"$MYTMP"/isnan.c
echo '#include <math.h>'>>"$MYTMP"/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
$c "$MYTMP"/isnan.c -o "$MYTMP"/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
@@ -42,13 +42,13 @@ fi
opts='-O3'
$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
-ranlib bin/$PLATFORM/liblpsolve55.a
+${AR:-ar} rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
+${RANLIB:-ranlib} bin/$PLATFORM/liblpsolve55.a
if [ "$so" != "" ]
then
- $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
- $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl
+ $c $CFLAGS $LDFLAGS -fpic -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
+ $c $CFLAGS $LDFLAGS -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl
fi
rm *.o 2>/dev/null
--- a/lpsolve55/ccc.aix
+++ b/lpsolve55/ccc.aix
@@ -4,14 +4,14 @@ src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../in
type xlc >/dev/null 2>&1
if [ $? = 0 ]
then c=xlc
-else c=cc
+else c=${CC:-cc}
fi
#determine platform (32/64 bit)
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
@@ -23,7 +23,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1
echo '#include <stdio.h>'>>/tmp/isnan.c
echo '#include <stdlib.h>'>>/tmp/isnan.c
echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
@@ -38,8 +38,8 @@ so=y
opts='-O2'
$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
-ranlib bin/$PLATFORM/liblpsolve55.a
+${AR:-ar} rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
+${RANLIB:-ranlib} bin/$PLATFORM/liblpsolve55.a
if [ "$so" != "" ]
then
--- a/lpsolve55/ccc.hp-ux
+++ b/lpsolve55/ccc.hp-ux
@@ -1,12 +1,12 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=${CC:-cc}
#determine platform (32/64 bit)
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
@@ -18,7 +18,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1
echo '#include <stdio.h>'>>/tmp/isnan.c
echo '#include <stdlib.h>'>>/tmp/isnan.c
echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
@@ -33,8 +33,8 @@ so=y
opts='-O3'
$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
-ranlib bin/$PLATFORM/liblpsolve55.a
+${AR:-ar} rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
+${RANLIB:-ranlib} bin/$PLATFORM/liblpsolve55.a
if [ "$so" != "" ]
then
--- a/lpsolve55/ccc.osx
+++ b/lpsolve55/ccc.osx
@@ -1,6 +1,6 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=${CC:-cc}
MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
@@ -8,7 +8,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
>"$MYTMP"/platform.c
echo '#include <stdlib.h>'>>"$MYTMP"/platform.c
echo '#include <stdio.h>'>>"$MYTMP"/platform.c
-echo 'main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
+echo 'int main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c
$c "$MYTMP"/platform.c -o "$MYTMP"/platform
PLATFORM=`"$MYTMP"/platform`
rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1
@@ -20,7 +20,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1
echo '#include <stdio.h>'>>"$MYTMP"/isnan.c
echo '#include <stdlib.h>'>>"$MYTMP"/isnan.c
echo '#include <math.h>'>>"$MYTMP"/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
$c "$MYTMP"/isnan.c -o "$MYTMP"/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
--- a/lpsolve55/ccc.solaris
+++ b/lpsolve55/ccc.solaris
@@ -1,12 +1,12 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=${CC:-cc}
#determine platform (32/64 bit)
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
@@ -18,7 +18,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1
echo '#include <stdio.h>'>>/tmp/isnan.c
echo '#include <stdlib.h>'>>/tmp/isnan.c
echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
@@ -33,8 +33,8 @@ so=y
opts='-O3'
$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
-ranlib bin/$PLATFORM/liblpsolve55.a
+${AR:-ar} rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
+${RANLIB:-ranlib} bin/$PLATFORM/liblpsolve55.a
if [ "$so" != "" ]
then
--- a/lpsolve55/cccLUSOL.osx
+++ b/lpsolve55/cccLUSOL.osx
@@ -1,11 +1,11 @@
src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c ../bfp/bfp_LUSOL/lusol.c'
-c=cc
+c=${CC:-cc}
#determine platform (32/64 bit)
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
@@ -17,7 +17,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1
echo '#include <stdio.h>'>>/tmp/isnan.c
echo '#include <stdlib.h>'>>/tmp/isnan.c
echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
+echo 'int main(){isnan(0.0);return 0;}'>>/tmp/isnan.c
$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
|