Package: snaphu / 2.0.3-1

0001-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
57
58
59
60
61
62
63
From: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
Date: Mon, 7 Aug 2017 21:34:46 +0000
Subject: hardening

CFLAGS setup has been modified to extent the settings of the external
environment.
CPPFLAGS and LDFLAGS are now used during the build phase.
---
 src/Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 2e20b76..c5fc6f2 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,4 +1,4 @@
-# Makefile for statistical-cost network-flow algorithm for phase unwrapping 
+# Makefile for statistical-cost network-flow algorithm for phase unwrapping
 # Curtis W. Chen
 # Copyright 2002,2017 Board of Trustees, Leland Stanford Jr. University
 
@@ -6,18 +6,18 @@
 # need, and the directory (BINDIR) in which the produced binary should
 # be written.
 #
-# If you want to copy the man page and executable to a system directory, 
-# specify the appropriate directories in the INSTALLDIR and MANDIR 
+# If you want to copy the man page and executable to a system directory,
+# specify the appropriate directories in the INSTALLDIR and MANDIR
 # variables and do 'make install' (you will probably need to be root).
 #
 # If you specify -D NO_CS2, the program will be compiled without the
 # CS2 MCF solver module.
 
-CC		=	cc
+#CC		=	cc
 OPTIMFLAGS	=	-O3
 DEBUGFLAGS	=	-ggdb
-CFLAGS		=	$(OPTIMFLAGS) -Wall # -Wuninitialized -m64 -D NO_CS2
-LIBS		=	-lm 
+CFLAGS		+=	$(OPTIMFLAGS) -Wall # -Wuninitialized -m64 -D NO_CS2
+LIBS		=	-lm
 BINDIR		=	../bin
 INSTALLDIR	=	/usr/local/bin
 MANDIR		=	/usr/local/man
@@ -28,14 +28,14 @@ OBJS		=	snaphu_tile.o \
 			snaphu_io.o \
 			snaphu_util.o \
 			snaphu_cost.o \
-			snaphu_cs2.o 
+			snaphu_cs2.o
 
 
 .PHONY:	all
 all:		$(SNAPHU)
 
-$(SNAPHU):	snaphu.c $(OBJS) snaphu.h Makefile 
-		$(CC) $(CFLAGS) \
+$(SNAPHU):	snaphu.c $(OBJS) snaphu.h Makefile
+		$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
 		snaphu.c \
 		$(OBJS) \
 		-o $(SNAPHU) \