File: Makefile-flags.patch

package info (click to toggle)
chkrootkit 0.58b-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,796 kB
  • sloc: sh: 187,089; ansic: 3,779; makefile: 103
file content (77 lines) | stat: -rw-r--r-- 2,311 bytes parent folder | download | duplicates (2)
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
From: Marcos Fouces <marcos@debian.org>
Date: Sun, 9 Jul 2017 18:42:55 +0200
Subject: Makefile

 1) Honor preprocesor and linker flags added at compile time by debhelper.
   Thanks to Lukas Schwaighofer for suggesting some improvements.
   Dates from 2017 or earlier
   Author:    Marcos Fouces <marcos@debian.org>
	 Date:      Sun Jul 9 18:42:55 2017 +0200

 2) Makefile: allow STATIC to be disabled - needed on termux
      compiling within termux fails with '-static', and strings-ststic
			compiles without it, so allow users to override STATIC
			when building

   Author: richard.lewis.debian@googlemail.com (Nov 2024)

Last-Updated: 2024-07-07
Forwarded: yes
 (Forwarded by email: 21 Dec 2024)
---
 Makefile | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 2dfd547..a776506 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,9 @@
 
 CC       ?= cc
 CFLAGS	 += -DHAVE_LASTLOG_H
-STATIC   = -static
+CPPFLAGS +=
+LDFLAGS +=
+STATIC   ?= -static
 
 ###
 ### Solaris 2.x
@@ -40,29 +42,29 @@ all:
 sense: chklastlog chkwtmp ifpromisc chkproc chkdirs check_wtmpx strings-static chkutmp
 
 chklastlog:   chklastlog.c
-	${CC} ${CFLAGS} -o $@ chklastlog.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ chklastlog.c
 
 chkwtmp:   chkwtmp.c
-	${CC} ${CFLAGS} -o $@ chkwtmp.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ chkwtmp.c
 
 ifpromisc:   ifpromisc.c
-	${CC} ${CFLAGS} ${LDFLAGS}  -D_FILE_OFFSET_BITS=64 -o $@ ifpromisc.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}  -D_FILE_OFFSET_BITS=64 -o $@ ifpromisc.c
 
 chkproc:   chkproc.c
-	${CC} ${LDFLAGS} -o $@ chkproc.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ chkproc.c
 
 chkdirs:   chkdirs.c
-	${CC} ${LDFLAGS} -o $@ chkdirs.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ chkdirs.c
 
 check_wtmpx:   check_wtmpx.c
-	${CC} ${LDFLAGS} -o $@ check_wtmpx.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ check_wtmpx.c
 
 chkutmp:   chkutmp.c
-	${CC} ${LDFLAGS} -o $@ chkutmp.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ chkutmp.c
 
 
 strings-static:   strings.c
-	${CC} ${STATIC} ${LDFLAGS} -o $@ strings.c
+	${CC} ${STATIC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ strings.c
 
 clean:
 	rm -f ${OBJS} core chklastlog chkwtmp ifpromisc chkproc chkdirs check_wtmpx strings-static chkutmp