File: 20_fix-Makefile.patch

package info (click to toggle)
statserial 1.1-25
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 188 kB
  • sloc: ansic: 516; makefile: 52; sh: 10
file content (35 lines) | stat: -rw-r--r-- 1,116 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
Description: remove -N from LDFLAGS.
Author: Brian Bassett <brian@butterfly.ml.org>
Last-Update: 1998-02-09

Description: install files in right places and add GCC hardening.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2017-10-05
Index: statserial-1.1/Makefile
===================================================================
--- statserial-1.1.orig/Makefile
+++ statserial-1.1/Makefile
@@ -6,18 +6,18 @@ LD	= gcc
 #LDFLAGS = -N
 
 # for production code
-CFLAGS	= -Wall -O3 -fomit-frame-pointer
-LDFLAGS = -s -N
+CFLAGS	+= -Wall -O3 -fomit-frame-pointer
+LDFLAGS += -s
 
 statserial:	statserial.o
 	$(LD) $(LDFLAGS) -o statserial statserial.o -lcurses
 
 statserial.o: statserial.c
-	$(CC) $(CFLAGS) -c statserial.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c statserial.c
 
 install: statserial
-	install -m 555 statserial /usr/local/bin/statserial
-	install -m 444 statserial.1 /usr/local/man/man1/statserial.1
+	install -D -m 755 statserial $(DESTDIR)/usr/bin/statserial
+	install -D -m 644 statserial.1 $(DESTDIR)/usr/share/man/man1/statserial.1
 
 clean:
 	$(RM) statserial statserial.o core *~