File: add-flags.patch

package info (click to toggle)
splitvt 1.6.6-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: ansic: 4,953; sh: 99; perl: 15; makefile: 10
file content (25 lines) | stat: -rw-r--r-- 1,145 bytes parent folder | download | duplicates (4)
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
Description: Prepare Makefile to be able to add hardening flags included in debian/rules.
Author Mònica Ramírez Arceda <monica@debian.org>
Last-Update: 2016-05-30

--- a/config.c
+++ b/config.c
@@ -260,15 +260,15 @@
 	}
 	fprintf(makefile, 
 		"PTYOPTS = -DPTYCHAR=$(PTYCHAR) -DHEXDIGIT=$(HEXDIGIT)\n");
-	sprintf(line, "\nCFLAGS = -Wall %s $(PTYOPTS)\nLIBS = %s\n", cflags, ldflags);
+	sprintf(line, "\nCFLAGS += -Wall %s $(PTYOPTS)\nLIBS = %s\n", cflags, ldflags);
 	fprintf(makefile, "%s", line);
 	fprintf(makefile, "OBJS = splitvt.o misc.o utmp.o vt100.o videomem.o terminal.o vttest.o vtmouse.o \\\n");
 	fprintf(makefile, "       parserc.o lock.o cut-paste.o\n\n");
 	fprintf(makefile, "splitvt: $(OBJS)\n");
 #if defined(linux) && !defined(DEBUG)
-	fprintf(makefile, "\t$(CC) -o $@ $(OBJS) $(LIBS)\n");
+	fprintf(makefile, "\t$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) \n");
 #else
-	fprintf(makefile, "\t$(CC) -o $@ $(OBJS) $(LIBS)\n");
+	fprintf(makefile, "\t$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)\n");
 #endif
 	fprintf(makefile, "\nclean: \n\trm -f *.o core \n");
 	fprintf(makefile, "\ndistclean: clean\n\trm -f splitvt Makefile\n");