File: 0001-Add-CFLAGS-LDFLAGS-to-compilation-line.patch

package info (click to toggle)
vtable-dumper 1.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: ansic: 430; makefile: 32; sh: 26
file content (32 lines) | stat: -rw-r--r-- 903 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
From 21150e1d3085460095cca644761d39fc161b4ac6 Mon Sep 17 00:00:00 2001
From: Mathieu Malaterre <malat@debian.org>
Date: Sat, 14 Jan 2017 22:00:01 +0100
Subject: Add CFLAGS/LDFLAGS to compilation line

Forwarded: no
---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f864452..a39f8f4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
 prefix ?= /usr
 
+cflags  ?= $(CFLAGS)
+ldflags ?= $(LDFLAGS)
+
 .PHONY: all install uninstall clean
 all: vtable-dumper
 
@@ -8,7 +11,7 @@ install: vtable-dumper
 	install vtable-dumper $(DESTDIR)$(prefix)/bin/
 
 vtable-dumper: dump-vtable.c dump-vtable.h
-	$(CC) $(CFLAGS) $(LDFLAGS) -o vtable-dumper dump-vtable.c -ldl -lelf -lstdc++
+	$(CC) $(CFLAGS) $(LDFLAGS) -o vtable-dumper dump-vtable.c -ldl -lelf -lstdc++ -Wall $(cflags) $(ldflags)
 
 uninstall:
 	rm -f $(DESTDIR)$(prefix)/bin/vtable-dumper