Package: masscan / 2:1.0.5+ds1-2

0001-buildsystem.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
Description: Fix linking flags order.
Author: Alessio Treglia <alessio@debian.org>
Forwarded: no
---
 Makefile |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -69,14 +69,14 @@ endif
 CC = clang
 
 DEFINES = 
-CFLAGS = -g -ggdb $(FLAGS2) $(INCLUDES) $(DEFINES) -Wall -O3
+CFLAGS += $(FLAGS2) $(INCLUDES) $(DEFINES) -Wall
 .SUFFIXES: .c .cpp
 
 all: bin/masscan 
 
 
 tmp/main-conf.o: src/main-conf.c src/*.h
-	$(CC) $(CFLAGS) -c $< -o $@ -DGIT=\"$(GITVER)\"
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ -DGIT=\"$(GITVER)\"
 
 
 # just compile everything in the 'src' directory. Using this technique
@@ -84,7 +84,7 @@ tmp/main-conf.o: src/main-conf.c src/*.h
 # the program crashes unexpectedly, 'make clean' then 'make' fixes the
 # problem that a .h file was out of date
 tmp/%.o: src/%.c src/*.h
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
 
 
 SRC = $(sort $(wildcard src/*.c))
@@ -92,7 +92,7 @@ OBJ = $(addprefix tmp/, $(notdir $(addsu
 
 
 bin/masscan: $(OBJ)
-	$(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
+	$(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
 
 clean:
 	rm -f tmp/*.o