Package: glam2 / 1064-3

hardening.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
Author: Andreas Tille <tille@debian.org>
LastChanged: Fri, 15 Nov 2013 15:07:59 +0100
Description: propagate hardening options

--- a/src/Makefile
+++ b/src/Makefile
@@ -24,32 +24,32 @@ FSRC = glam2format.c alignment.c fasta.c
 MSRC = glam2mask.c alignment.c fasta.c util.c
 
 # Compiler options:
-CFLAGS = -Wall -O3
+CFLAGS += -Wall -O3
 
 # Default action: compile glam2, glam2scan, glam2format, and glam2mask
 all: glam2 glam2scan glam2format glam2mask
 
 # Command for compiling glam2:
 glam2: $(GSRC) *.h Makefile
-	cc $(CFLAGS) -o glam2 $(GSRC) -lm
+	cc $(CFLAGS) -o glam2 $(GSRC) -lm $(LDFLAGS)
 
 # Command for compiling glam2scan:
 glam2scan: $(SSRC) *.h Makefile
-	cc $(CFLAGS) -o glam2scan $(SSRC) -lm
+	cc $(CFLAGS) -o glam2scan $(SSRC) -lm $(LDFLAGS)
 
 # Command for compiling glam2format:
 glam2format: $(FSRC) *.h Makefile
-	cc $(CFLAGS) -o glam2format $(FSRC) -lm
+	cc $(CFLAGS) -o glam2format $(FSRC) -lm $(LDFLAGS)
 
 # Command for compiling glam2mask:
 glam2mask: $(MSRC) *.h Makefile
-	cc $(CFLAGS) -o glam2mask $(MSRC) -lm
+	cc $(CFLAGS) -o glam2mask $(MSRC) -lm $(LDFLAGS)
 
 # Here follow commands for compiling special versions of the programs
 
 # Compile glam2 including FFT algorithm (requires FFTW to be installed):
 glam2fft: $(GSRC) convolve.c *.h Makefile
-	cc $(CFLAGS) -DFFT -o glam2fft $(GSRC) convolve.c -lm -lfftw3
+	cc $(CFLAGS) -DFFT -o glam2fft $(GSRC) convolve.c -lm -lfftw3 $(LDFLAGS)
 
 # Compile for debugging with gdb or valgrind, with extra compiler warnings:
 glam2_d: $(GSRC) *.h Makefile
--- a/purge/Makefile
+++ b/purge/Makefile
@@ -1,6 +1,6 @@
 # Compiler options:
-CFLAGS = -Wall -O3
+CFLAGS += -Wall -O3
 
 # Command for compiling purge:
 purge: *.c *.h Makefile
-	cc $(CFLAGS) -o purge *.c -lm
+	cc $(CFLAGS) -o purge *.c -lm $(LDFLAGS)