Package: newlisp / 10.7.1-1

0003-Use-LDFLAGS-when-linking.patch Patch series | download
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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date: Sun, 12 Jun 2016 14:01:52 -0400
Subject: Use LDFLAGS when linking

---
 makefile_aixILP32_utf8_gcc            | 2 +-
 makefile_aixLP64_utf8_gcc             | 2 +-
 makefile_aixLP64_utf8_xlc             | 2 +-
 makefile_aix_utf8_gcc                 | 2 +-
 makefile_aix_utf8_xlc                 | 2 +-
 makefile_amal_darwin_utf8_ffi         | 2 +-
 makefile_bsd                          | 4 ++--
 makefile_bsdLP64                      | 4 ++--
 makefile_bsdLP64_utf8                 | 4 ++--
 makefile_bsdLP64_utf8_ffi             | 4 ++--
 makefile_bsdLP64_utf8_lib             | 2 +-
 makefile_bsd_lib                      | 2 +-
 makefile_bsd_utf8                     | 4 ++--
 makefile_bsd_utf8_ffi                 | 4 ++--
 makefile_bsd_utf8_lib                 | 2 +-
 makefile_cygwin                       | 4 ++--
 makefile_cygwinLP64                   | 4 ++--
 makefile_darwin                       | 2 +-
 makefile_darwinLP64                   | 2 +-
 makefile_darwinLP64_utf8              | 2 +-
 makefile_darwinLP64_utf8_ffi          | 2 +-
 makefile_darwinLP64_utf8_lib          | 2 +-
 makefile_darwin_universal_utf8_compat | 2 +-
 makefile_darwin_utf8                  | 2 +-
 makefile_darwin_utf8_ffi              | 2 +-
 makefile_darwin_utf8_leopardIntel     | 2 +-
 makefile_darwin_utf8_leopardIntel_ffi | 2 +-
 makefile_darwin_utf8_leopardPPC       | 2 +-
 makefile_darwin_utf8_leopardPPC_ffi   | 2 +-
 makefile_darwin_utf8_lib              | 2 +-
 makefile_emscripten_lib_utf8          | 2 +-
 makefile_linux                        | 6 +++---
 makefile_linuxLP64                    | 8 ++++----
 makefile_linuxLP64_ffi                | 8 ++++----
 makefile_linuxLP64_lib                | 2 +-
 makefile_linuxLP64_redhat_utf8_ffi    | 2 +-
 makefile_linuxLP64_utf8               | 8 ++++----
 makefile_linuxLP64_utf8_ffi           | 8 ++++----
 makefile_linux_ffi                    | 8 ++++----
 makefile_linux_lib                    | 2 +-
 makefile_linux_lib_utf8               | 2 +-
 makefile_linux_maemo_utf8             | 8 ++++----
 makefile_linux_openwrt                | 2 +-
 makefile_linux_redhat_utf8_ffi        | 2 +-
 makefile_linux_utf8                   | 8 ++++----
 makefile_linux_utf8_ffi               | 8 ++++----
 makefile_netbsd                       | 4 ++--
 makefile_netbsd_utf8                  | 4 ++--
 makefile_opensolaris                  | 2 +-
 makefile_os2                          | 4 ++--
 makefile_raspberrypi                  | 4 ++--
 makefile_raspberrypi_utf8             | 4 ++--
 makefile_sunos                        | 2 +-
 makefile_sunosLP64                    | 2 +-
 makefile_sunosLP64_utf8               | 2 +-
 makefile_sunos_utf8                   | 2 +-
 makefile_tru64                        | 4 ++--
 57 files changed, 97 insertions(+), 97 deletions(-)

diff --git a/makefile_aixILP32_utf8_gcc b/makefile_aixILP32_utf8_gcc
index f0c3694..0ba3fad 100644
--- a/makefile_aixILP32_utf8_gcc
+++ b/makefile_aixILP32_utf8_gcc
@@ -9,7 +9,7 @@ DEFAULT_CFLAGS = -maix32 -Wall -pedantic -fno-strict-aliasing -Wno-uninitialized
 CC = gcc 
 
 default: $(OBJS) 
-	$(CC) $(OBJS) -maix32 -lm  -ldl -lrt -lnsl -o newlisp 
+	$(CC) $(LDFLAGS) $(OBJS) -maix32 -lm  -ldl -lrt -lnsl -o newlisp 
 
 .c.o: 
 	$(CC) $(DEFAULT_CFLAGS) $< 
diff --git a/makefile_aixLP64_utf8_gcc b/makefile_aixLP64_utf8_gcc
index ea0d37b..5c0deeb 100644
--- a/makefile_aixLP64_utf8_gcc
+++ b/makefile_aixLP64_utf8_gcc
@@ -9,7 +9,7 @@ DEFAULT_CFLAGS = -maix64 -Wall -pedantic -fno-strict-aliasing -Wno-uninitialized
 CC = gcc 
 
 default: $(OBJS) 
-	$(CC) $(OBJS) -maix64 -lm  -ldl -lrt -lnsl -o newlisp 
+	$(CC) $(LDFLAGS) $(OBJS) -maix64 -lm  -ldl -lrt -lnsl -o newlisp 
 
 .c.o: 
 	$(CC) $(DEFAULT_CFLAGS) $< 
diff --git a/makefile_aixLP64_utf8_xlc b/makefile_aixLP64_utf8_xlc
index ff66a9c..97b9726 100644
--- a/makefile_aixLP64_utf8_xlc
+++ b/makefile_aixLP64_utf8_xlc
@@ -11,7 +11,7 @@ CC = xlc_r
 
 
 default: $(OBJS) 
-	OBJECT_MODE=64 $(CC) $(OBJS) -lm  -ldl -lrt -lnsl -o newlisp 
+	OBJECT_MODE=64 $(CC) $(LDFLAGS) $(OBJS) -lm  -ldl -lrt -lnsl -o newlisp 
 
 .c.o: 
 	$(CC) $(DEFAULT_CFLAGS) $< 
diff --git a/makefile_aix_utf8_gcc b/makefile_aix_utf8_gcc
index ac0cbb5..ed2918c 100644
--- a/makefile_aix_utf8_gcc
+++ b/makefile_aix_utf8_gcc
@@ -9,7 +9,7 @@ DEFAULT_CFLAGS = -Wall -pedantic -fno-strict-aliasing -Wno-uninitialized -Wno-lo
 CC = gcc 
 
 default: $(OBJS) 
-	$(CC) $(OBJS) -lm  -ldl -lrt -lnsl -o newlisp 
+	$(CC) $(LDFLAGS) $(OBJS) -lm  -ldl -lrt -lnsl -o newlisp 
 
 .c.o: 
 	$(CC) $(DEFAULT_CFLAGS) $< 
diff --git a/makefile_aix_utf8_xlc b/makefile_aix_utf8_xlc
index 65b8e40..74fe320 100644
--- a/makefile_aix_utf8_xlc
+++ b/makefile_aix_utf8_xlc
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -c -g -O2 -DSUPPORT_UTF8 -DAIX  $(CFLAGS)
 CC = xlc_r 
 
 default: $(OBJS) 
-	$(CC) $(OBJS) -lm  -ldl -lrt -lnsl -o newlisp 
+	$(CC) $(LDFLAGS) $(OBJS) -lm  -ldl -lrt -lnsl -o newlisp 
 
 .c.o: 
 	$(CC) $(DEFAULT_CFLAGS) $< 
diff --git a/makefile_amal_darwin_utf8_ffi b/makefile_amal_darwin_utf8_ffi
index 93620a4..251b5d8 100644
--- a/makefile_amal_darwin_utf8_ffi
+++ b/makefile_amal_darwin_utf8_ffi
@@ -14,7 +14,7 @@ DEFAULT_CFLAGS = -Wall -m32 -O1 -I/usr/include -c -DREADLINE -DMAC_OSX -DSUPPORT
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -lreadline -lffi -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -lreadline -lffi -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsd b/makefile_bsd
index bac0e0c..a10cb31 100644
--- a/makefile_bsd
+++ b/makefile_bsd
@@ -13,9 +13,9 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
 # or without readline lib
-#	$(CC) $(OBJS) -m32 -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsdLP64 b/makefile_bsdLP64
index c4808be..c993aa4 100644
--- a/makefile_bsdLP64
+++ b/makefile_bsdLP64
@@ -13,9 +13,9 @@ DEFAULT_CFLAGS = -m64 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -lreadline -lncurses -o newlisp
 # or without readline lib
-#	$(CC) $(OBJS) -m64 -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsdLP64_utf8 b/makefile_bsdLP64_utf8
index ad38421..ef75b65 100644
--- a/makefile_bsdLP64_utf8
+++ b/makefile_bsdLP64_utf8
@@ -13,9 +13,9 @@ DEFAULT_CFLAGS = -m64 -Wall -Wno-strict-aliasing -O2 -c -g -I/usr/local/include
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -lreadline -lncurses -o newlisp
 # or without readline lib
-#	$(CC) $(OBJS) -m64 -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsdLP64_utf8_ffi b/makefile_bsdLP64_utf8_ffi
index 95dc566..652c5c7 100644
--- a/makefile_bsdLP64_utf8_ffi
+++ b/makefile_bsdLP64_utf8_ffi
@@ -13,9 +13,9 @@ DEFAULT_CFLAGS = -m64 -Wall -fno-strict-aliasing -O2 -c -g -I/usr/local/include
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -lreadline -lncurses -L/usr/local/lib -lffi -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -lreadline -lncurses -L/usr/local/lib -lffi -o newlisp
 # or without readline lib
-#	$(CC) $(OBJS) -m64 -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsdLP64_utf8_lib b/makefile_bsdLP64_utf8_lib
index 3e36937..192f0ac 100644
--- a/makefile_bsdLP64_utf8_lib
+++ b/makefile_bsdLP64_utf8_lib
@@ -8,7 +8,7 @@ DEFAULT_CFLAGS = -m64 -fPIC -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -lm -shared -o newlisp.so
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -lm -shared -o newlisp.so
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsd_lib b/makefile_bsd_lib
index f72cf85..f0b7a84 100644
--- a/makefile_bsd_lib
+++ b/makefile_bsd_lib
@@ -8,7 +8,7 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -shared -o newlisp.so
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -shared -o newlisp.so
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsd_utf8 b/makefile_bsd_utf8
index 74b65e1..f714825 100644
--- a/makefile_bsd_utf8
+++ b/makefile_bsd_utf8
@@ -11,9 +11,9 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
 # or without readline lib
-#	$(CC) $(OBJS) -m32 -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsd_utf8_ffi b/makefile_bsd_utf8_ffi
index daf759f..d01566d 100644
--- a/makefile_bsd_utf8_ffi
+++ b/makefile_bsd_utf8_ffi
@@ -12,9 +12,9 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -I
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -lreadline -lncurses -L/usr/local/lib -lffi -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -lreadline -lncurses -L/usr/local/lib -lffi -o newlisp
 # or without readline lib
-#	$(CC) $(OBJS) -m32 -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_bsd_utf8_lib b/makefile_bsd_utf8_lib
index 55b8de4..104b481 100644
--- a/makefile_bsd_utf8_lib
+++ b/makefile_bsd_utf8_lib
@@ -8,7 +8,7 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -shared -o newlisp.so
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -shared -o newlisp.so
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_cygwin b/makefile_cygwin
index 03009ac..a0b12dd 100644
--- a/makefile_cygwin
+++ b/makefile_cygwin
@@ -25,8 +25,8 @@ CC = gcc
 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp.exe
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp.exe
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp.exe
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp.exe
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_cygwinLP64 b/makefile_cygwinLP64
index a835aa6..1b996f1 100644
--- a/makefile_cygwinLP64
+++ b/makefile_cygwinLP64
@@ -25,8 +25,8 @@ CC = gcc
 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -o newlisp.exe
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp.exe
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -o newlisp.exe
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp.exe
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin b/makefile_darwin
index aa9aca9..a84fd64 100644
--- a/makefile_darwin
+++ b/makefile_darwin
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m32 -Wall -O1 -c -DREADLINE -DMAC_OSX $(CFLAGS)
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -lreadline -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -lreadline -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwinLP64 b/makefile_darwinLP64
index f161bbe..c71aba2 100644
--- a/makefile_darwinLP64
+++ b/makefile_darwinLP64
@@ -12,7 +12,7 @@ DEFAULT_CFLAGS = -m64 -Wall -O1 -c -g -DREADLINE -DMAC_OSX -DNEWLISP64 $(CFLAGS)
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -lreadline -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -lreadline -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwinLP64_utf8 b/makefile_darwinLP64_utf8
index 9581a19..26dd4e1 100644
--- a/makefile_darwinLP64_utf8
+++ b/makefile_darwinLP64_utf8
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m64 -Wall -Oz -c -g -DREADLINE -DMAC_OSX -DNEWLISP64 -DSUPPORT
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -lreadline -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -lreadline -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwinLP64_utf8_ffi b/makefile_darwinLP64_utf8_ffi
index 5c9169a..78c9847 100644
--- a/makefile_darwinLP64_utf8_ffi
+++ b/makefile_darwinLP64_utf8_ffi
@@ -12,7 +12,7 @@ CC = cc
 #CC = gcc 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -lm -lreadline -lffi -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -lm -lreadline -lffi -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwinLP64_utf8_lib b/makefile_darwinLP64_utf8_lib
index c0c22f9..707204c 100644
--- a/makefile_darwinLP64_utf8_lib
+++ b/makefile_darwinLP64_utf8_lib
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m64 -Wall -O1 -c -DREADLINE -DMAC_OSX -DSUPPORT_UTF8 -DLIBRARY
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -lm -lreadline -bundle -o newlisp.dylib
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -lm -lreadline -bundle -o newlisp.dylib
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin_universal_utf8_compat b/makefile_darwin_universal_utf8_compat
index d20bc8a..e177e24 100644
--- a/makefile_darwin_universal_utf8_compat
+++ b/makefile_darwin_universal_utf8_compat
@@ -35,7 +35,7 @@ OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-fil
 	nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
 
 default: $(OBJS)
-	$(CC) $(OBJS) -mmacosx-version-min=10.4 -arch i386 -arch ppc -g -lm -lreadline -o newlisp-universal
+	$(CC) $(LDFLAGS) $(OBJS) -mmacosx-version-min=10.4 -arch i386 -arch ppc -g -lm -lreadline -o newlisp-universal
 #   lipo newlisp-universal -output newlisp-intel -thin i386
 #   lipo newlisp-universal -output newlisp-ppc -thin ppc
 
diff --git a/makefile_darwin_utf8 b/makefile_darwin_utf8
index 7289aa9..ce14874 100644
--- a/makefile_darwin_utf8
+++ b/makefile_darwin_utf8
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m32 -Wall -O1 -c -DREADLINE -DMAC_OSX -DSUPPORT_UTF8 $(CFLAGS)
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -lreadline -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -lreadline -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin_utf8_ffi b/makefile_darwin_utf8_ffi
index 2c14bb2..453a0bd 100644
--- a/makefile_darwin_utf8_ffi
+++ b/makefile_darwin_utf8_ffi
@@ -12,7 +12,7 @@ CC = cc
 #CC = gcc 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -lreadline -lffi -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -lreadline -lffi -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin_utf8_leopardIntel b/makefile_darwin_utf8_leopardIntel
index 07f6ff4..9c16a1a 100644
--- a/makefile_darwin_utf8_leopardIntel
+++ b/makefile_darwin_utf8_leopardIntel
@@ -20,7 +20,7 @@ OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-fil
 	nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
 
 default: $(OBJS)
-	$(CC) $(OBJS) -mmacosx-version-min=10.5 -arch i386 -g -lm -lreadline -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -mmacosx-version-min=10.5 -arch i386 -g -lm -lreadline -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin_utf8_leopardIntel_ffi b/makefile_darwin_utf8_leopardIntel_ffi
index ef3cddf..ed83a23 100644
--- a/makefile_darwin_utf8_leopardIntel_ffi
+++ b/makefile_darwin_utf8_leopardIntel_ffi
@@ -20,7 +20,7 @@ OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-fil
 	nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
 
 default: $(OBJS)
-	$(CC) $(OBJS) -mmacosx-version-min=10.5 -arch i386 -g -lm -lreadline -lffi -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -mmacosx-version-min=10.5 -arch i386 -g -lm -lreadline -lffi -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin_utf8_leopardPPC b/makefile_darwin_utf8_leopardPPC
index ca11fd5..e893fe1 100644
--- a/makefile_darwin_utf8_leopardPPC
+++ b/makefile_darwin_utf8_leopardPPC
@@ -25,7 +25,7 @@ OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-fil
 	nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
 
 default: $(OBJS)
-	$(CC) $(OBJS) -mmacosx-version-min=10.5 -arch ppc -g -lm -lreadline -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -mmacosx-version-min=10.5 -arch ppc -g -lm -lreadline -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin_utf8_leopardPPC_ffi b/makefile_darwin_utf8_leopardPPC_ffi
index 6627a85..876e430 100644
--- a/makefile_darwin_utf8_leopardPPC_ffi
+++ b/makefile_darwin_utf8_leopardPPC_ffi
@@ -25,7 +25,7 @@ OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-fil
 	nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -mmacosx-version-min=10.5 -arch ppc -g -lm -lreadline -lffi -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -mmacosx-version-min=10.5 -arch ppc -g -lm -lreadline -lffi -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_darwin_utf8_lib b/makefile_darwin_utf8_lib
index 4319f9c..99c567c 100644
--- a/makefile_darwin_utf8_lib
+++ b/makefile_darwin_utf8_lib
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m32 -Wall -O1 -c -DREADLINE -DMAC_OSX -DSUPPORT_UTF8 -DLIBRARY
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -lreadline -bundle -o newlisp.dylib
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -lreadline -bundle -o newlisp.dylib
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_emscripten_lib_utf8 b/makefile_emscripten_lib_utf8
index fa54783..2f468aa 100644
--- a/makefile_emscripten_lib_utf8
+++ b/makefile_emscripten_lib_utf8
@@ -28,7 +28,7 @@ CC = emcc
 default: $(OBJS)
 	cp qa-specific-tests/qa-bench newlisp-js
 	cp modules/canvas.lsp newlisp-js
-	$(CC) $(OBJS) -m32 -O2 -o newlisp-js-lib.html -s EXPORTED_FUNCTIONS="['_newlispEvalStr']" \
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -O2 -o newlisp-js-lib.html -s EXPORTED_FUNCTIONS="['_newlispEvalStr']" \
 	-s MAX_SETJMPS=100 -s TOTAL_MEMORY=33554432 --closure 1 \
 	--embed-file newlisp-js/readme.txt --embed-file newlisp-js/qa-bench --embed-file newlisp-js/canvas.lsp
 	rm newlisp-js/qa-bench newlisp-js/canvas.lsp
diff --git a/makefile_linux b/makefile_linux
index 9f17ac8..aa34513 100644
--- a/makefile_linux
+++ b/makefile_linux
@@ -13,9 +13,9 @@ CC = gcc
 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linuxLP64 b/makefile_linuxLP64
index 65b1b81..d308eca 100644
--- a/makefile_linuxLP64
+++ b/makefile_linuxLP64
@@ -11,10 +11,10 @@ DEFAULT_CFLAGS = -fPIC -m64 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-l
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linuxLP64_ffi b/makefile_linuxLP64_ffi
index 71c2bf8..5e31b72 100644
--- a/makefile_linuxLP64_ffi
+++ b/makefile_linuxLP64_ffi
@@ -11,10 +11,10 @@ DEFAULT_CFLAGS = -fPIC -m64 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-l
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linuxLP64_lib b/makefile_linuxLP64_lib
index c0789cd..b82f9f5 100644
--- a/makefile_linuxLP64_lib
+++ b/makefile_linuxLP64_lib
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -fPIC -m64 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-l
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -ldl -shared -o newlisp.so
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -shared -o newlisp.so
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linuxLP64_redhat_utf8_ffi b/makefile_linuxLP64_redhat_utf8_ffi
index ed73ee1..4db1120 100644
--- a/makefile_linuxLP64_redhat_utf8_ffi
+++ b/makefile_linuxLP64_redhat_utf8_ffi
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -fPIC -m64 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-l
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp # for RedHat CentOS
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp # for RedHat CentOS
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linuxLP64_utf8 b/makefile_linuxLP64_utf8
index 3330e80..4dea813 100644
--- a/makefile_linuxLP64_utf8
+++ b/makefile_linuxLP64_utf8
@@ -11,10 +11,10 @@ DEFAULT_CFLAGS = -fPIC -m64 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-l
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linuxLP64_utf8_ffi b/makefile_linuxLP64_utf8_ffi
index 63a58cc..30ee8c6 100644
--- a/makefile_linuxLP64_utf8_ffi
+++ b/makefile_linuxLP64_utf8_ffi
@@ -14,10 +14,10 @@ DEFAULT_CFLAGS = -fPIC -m64 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-l
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linux_ffi b/makefile_linux_ffi
index 52fcf98..d386cf3 100644
--- a/makefile_linux_ffi
+++ b/makefile_linux_ffi
@@ -12,10 +12,10 @@ CC = gcc
 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linux_lib b/makefile_linux_lib
index 3d21ade..f91b505 100644
--- a/makefile_linux_lib
+++ b/makefile_linux_lib
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-long-lo
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -ldl -shared -o newlisp.so
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -ldl -shared -o newlisp.so
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linux_lib_utf8 b/makefile_linux_lib_utf8
index cb380de..1836f34 100644
--- a/makefile_linux_lib_utf8
+++ b/makefile_linux_lib_utf8
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -Wno-long-lo
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -ldl -shared -o newlisp.so
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -ldl -shared -o newlisp.so
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linux_maemo_utf8 b/makefile_linux_maemo_utf8
index ee646c2..f227d07 100644
--- a/makefile_linux_maemo_utf8
+++ b/makefile_linux_maemo_utf8
@@ -12,10 +12,10 @@ CC = gcc
 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
-#    $(CC) $(OBJS) -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#    $(CC) $(OBJS) -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#    $(CC) $(OBJS) -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
+#    $(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#    $(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#    $(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linux_openwrt b/makefile_linux_openwrt
index 0e8d028..53d7cbf 100644
--- a/makefile_linux_openwrt
+++ b/makefile_linux_openwrt
@@ -14,7 +14,7 @@ LD = mips-openwrt-linux-ld
 
 
 default: $(OBJS)
-	$(CC) $(OBJS)  -o newlisp $(LDFLAGS)   #for openwrt
+	$(CC) $(LDFLAGS) $(OBJS)  -o newlisp $(LDFLAGS)   #for openwrt
 	$(STRIP) newlisp
 	upx --best -o newlisp_s newlisp
 	rm newlisp
diff --git a/makefile_linux_redhat_utf8_ffi b/makefile_linux_redhat_utf8_ffi
index 7de414c..c9f4525 100644
--- a/makefile_linux_redhat_utf8_ffi
+++ b/makefile_linux_redhat_utf8_ffi
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREAD
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp # for RedHat CentOS 
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp # for RedHat CentOS 
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linux_utf8 b/makefile_linux_utf8
index c272f22..fb6576b 100644
--- a/makefile_linux_utf8
+++ b/makefile_linux_utf8
@@ -11,10 +11,10 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREAD
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_linux_utf8_ffi b/makefile_linux_utf8_ffi
index 10b6dc2..24487c0 100644
--- a/makefile_linux_utf8_ffi
+++ b/makefile_linux_utf8_ffi
@@ -11,10 +11,10 @@ DEFAULT_CFLAGS = -fPIC -m32 -Wall -Wno-strict-aliasing -Wno-long-long -c -O2 -g
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
-#	$(CC) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lffi -o newlisp # for UBUNTU Debian
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
+#	$(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_netbsd b/makefile_netbsd
index e34c152..236f087 100644
--- a/makefile_netbsd
+++ b/makefile_netbsd
@@ -12,9 +12,9 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -O2 -c -g -D
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -g -lm -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -g -lm -lreadline -lncurses -o newlisp
 # to compile wihtout readline support 
-#	$(CC) $(OBJS) -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_netbsd_utf8 b/makefile_netbsd_utf8
index f683828..7ef0fe3 100644
--- a/makefile_netbsd_utf8
+++ b/makefile_netbsd_utf8
@@ -12,9 +12,9 @@ DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -O2 -c -g -D
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -g -lm -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -g -lm -lreadline -lncurses -o newlisp
 # without readline support
-#	$(CC) $(OBJS) -g -lm -o newlisp
+#	$(CC) $(LDFLAGS) $(OBJS) -g -lm -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_opensolaris b/makefile_opensolaris
index 6d7d02f..242de00 100644
--- a/makefile_opensolaris
+++ b/makefile_opensolaris
@@ -10,7 +10,7 @@ DEFAULT_CFLAGS = -m32 -Wall -pedantic -Wno-uninitialized -Wno-long-long -fno-str
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -lm -ldl -lrt -lsocket -lnsl -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -lm -ldl -lrt -lsocket -lnsl -o newlisp
 	@echo ""
 	@echo "do not use 'make install' install files manually; see Makefile for details"
 	@echo "for a minimum install just put newlisp into /usr/bin/newlisp
diff --git a/makefile_os2 b/makefile_os2
index 66d4f2a..9b2c9a2 100644
--- a/makefile_os2
+++ b/makefile_os2
@@ -11,8 +11,8 @@ DEFAULT_CFLAGS = -Wall -pedantic -Wno-uninitialized -Wno-strict-aliasing -Wno-lo
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -Zomf -Zmt -lm -lreadline -lncurses -ldl -o newlisp.exe
-	#$(CC) $(OBJS) -Zomf -Zmt -lm -ldl -o newlisp.exe
+	$(CC) $(LDFLAGS) $(OBJS) -Zomf -Zmt -lm -lreadline -lncurses -ldl -o newlisp.exe
+	#$(CC) $(LDFLAGS) $(OBJS) -Zomf -Zmt -lm -ldl -o newlisp.exe
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_raspberrypi b/makefile_raspberrypi
index 1b14737..15054e6 100644
--- a/makefile_raspberrypi
+++ b/makefile_raspberrypi
@@ -17,8 +17,8 @@ CC = gcc
 
 
 default: $(OBJS)
-#	$(CC) $(OBJS) -g -lm -ldl -lreadline -o newlisp # with readline support 
-	$(CC) $(OBJS) -g -lm -ldl -o newlisp # without readline support
+#	$(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -lreadline -o newlisp # with readline support 
+	$(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_raspberrypi_utf8 b/makefile_raspberrypi_utf8
index e4714aa..4e8caaa 100644
--- a/makefile_raspberrypi_utf8
+++ b/makefile_raspberrypi_utf8
@@ -16,8 +16,8 @@ CC = gcc
 
 
 default: $(OBJS)
-#	$(CC) $(OBJS) -g -lm -ldl -lreadline -o newlisp #  with readline support
-	$(CC) $(OBJS) -g -lm -ldl -o newlisp # without readline support
+#	$(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -lreadline -o newlisp #  with readline support
+	$(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -o newlisp # without readline support
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_sunos b/makefile_sunos
index a0e11a5..f130a02 100644
--- a/makefile_sunos
+++ b/makefile_sunos
@@ -10,7 +10,7 @@ DEFAULT_CFLAGS = -m32 -Wall -pedantic -Wno-uninitialized -Wno-long-long -fno-str
 CC = gcc 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_sunosLP64 b/makefile_sunosLP64
index 711652b..a3e02fe 100644
--- a/makefile_sunosLP64
+++ b/makefile_sunosLP64
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m64 -Wall -pedantic -Wno-uninitialized -Wno-long-long -fno-str
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_sunosLP64_utf8 b/makefile_sunosLP64_utf8
index 1da6dca..78c987c 100644
--- a/makefile_sunosLP64_utf8
+++ b/makefile_sunosLP64_utf8
@@ -11,7 +11,7 @@ DEFAULT_CFLAGS = -m64 -Wall -pedantic -Wno-uninitialized -Wno-long-long -fno-str
 CC = gcc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m64 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m64 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_sunos_utf8 b/makefile_sunos_utf8
index 5dd3aa4..57dbdc2 100644
--- a/makefile_sunos_utf8
+++ b/makefile_sunos_utf8
@@ -13,7 +13,7 @@ CC = gcc
 
 
 default: $(OBJS)
-	$(CC) $(OBJS) -m32 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -m32 -lm -ldl -lrt -lsocket -lnsl -lreadline -lncurses -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_tru64 b/makefile_tru64
index 1e1956f..5590a49 100644
--- a/makefile_tru64
+++ b/makefile_tru64
@@ -11,10 +11,10 @@ DEFAULT_CFLAGS = -ieee -pedantic -c -O3 -DTRU64 -DNEWLISP64 -D_POSIX_PII_SOCKET
 CC = cc
 
 default: $(OBJS)
-	$(CC) $(OBJS) -lm -lrt -ldb -lbsd -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -lm -lrt -ldb -lbsd -o newlisp
 
 readline: $(OBJS)
-	$(CC) $(OBJS) -lm -lrt -ldb -lbsd -lreadline -ltermcap -o newlisp
+	$(CC) $(LDFLAGS) $(OBJS) -lm -lrt -ldb -lbsd -lreadline -ltermcap -o newlisp
 
 .c.o:
 	$(CC) $(DEFAULT_CFLAGS) $<