Codebase list baitfisher / a71b5f1
Hardening Andreas Tille 6 years ago
3 changed file(s) with 84 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
00 baitfisher (1.0+dfsg-3) UNRELEASED; urgency=medium
11
2 [ Steffen Moeller ]
23 * debian/upstream/metadata:
34 - Added registries
45 - yamllint cleanliness
56
6 -- Steffen Moeller <moeller@debian.org> Wed, 06 Sep 2017 23:35:43 +0200
7 [ Andreas Tille ]
8 * Enable hardening (thanks for the patch to Juhani Numminen
9 <juhaninumminen0@gmail.com>)
10
11 -- Andreas Tille <tille@debian.org> Mon, 11 Dec 2017 20:34:33 +0100
712
813 baitfisher (1.0+dfsg-2) unstable; urgency=medium
914
0 From: Juhani Numminen <juhaninumminen0@gmail.com>
1 Date: Mon, 11 Dec 2017 14:26:43 +0200
2 Subject: [PATCH] Allow extra flags in CPPFLAGS, CXXFLAGS and LDFLAGS.
3 Use the standard meaning of the variables CXX, CPPFLAGS, CXXFLAGS and
4 LDFLAGS and does not overwrite them, so that makefile users (eg. Debian
5 packagers) can pass extra build flags in environment variables.
6 .
7 Reference:
8 https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
9 https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html
10 https://www.gnu.org/prep/standards/standards.html#Command-Variables
11 https://wiki.debian.org/UpstreamGuide#Make
12 ---
13 makefile | 10 +++++-----
14 makefile_win | 10 +++++-----
15 2 files changed, 10 insertions(+), 10 deletions(-)
16
17 diff --git a/makefile b/makefile
18 index 609fcd6..596703c 100644
19 --- a/makefile
20 +++ b/makefile
21 @@ -1,19 +1,19 @@
22 -CPP = g++
23 -CPPFLAGS = -I . -O3
24 +CXX = g++
25 +BAIT_CXXFLAGS = -I . -O3
26
27 OBJECTS1 = bait-fisher-helper.o bait-fisher.o Csequence_cluster_and_center_sequence.o mydir-unix.o
28 OBJECTS2 = bait-filter.o global-types-and-parameters.o
29
30 %.o: %.cpp
31 - $(CPP) $(CPPFLAGS) -c $< -o $@
32 + $(CXX) $(CPPFLAGS) $(BAIT_CXXFLAGS) $(CXXFLAGS) -c $< -o $@
33
34 default: BaitFisher-v1.2.7 BaitFilter-v1.0.5
35
36 BaitFisher-v1.2.7: $(OBJECTS1)
37 - $(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS1) -o $@
38 + $(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS1) -o $@
39
40 BaitFilter-v1.0.5: $(OBJECTS2)
41 - $(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS2) -o $@
42 + $(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS2) -o $@
43
44 clean:
45 rm -f *.o
46 diff --git a/makefile_win b/makefile_win
47 index 9cd3de0..3512232 100644
48 --- a/makefile_win
49 +++ b/makefile_win
50 @@ -1,21 +1,21 @@
51 ## Requires mingw to be installed".
52
53 -CPP = g++
54 -CPPFLAGS = -I . -O3
55 +CXX = g++
56 +BAIT_CXXFLAGS = -I . -O3
57
58 OBJECTS1 = bait-fisher-helper.o bait-fisher.o Csequence_cluster_and_center_sequence.o mydir-unix.o
59 OBJECTS2 = bait-filter.o global-types-and-parameters.o
60
61 %.o: %.cpp
62 - $(CPP) $(CPPFLAGS) -c $< -o $@
63 + $(CXX) $(CPPFLAGS) $(BAIT_CXXFLAGS) $(CXXFLAGS) -c $< -o $@
64
65 default: BaitFisher-v1.2.7 BaitFilter-v1.0.5
66
67 BaitFisher-v1.2.7: $(OBJECTS1)
68 - $(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS1) -o $@
69 + $(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS1) -o $@
70
71 BaitFilter-v1.0.5: $(OBJECTS2)
72 - $(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS2) -o $@
73 + $(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS2) -o $@
74
75 clean:
76 rm -f *.o
00 adapt_examples.patch
11 fix_gcc6.patch
2 hardening.patch