File: honor-cflags-and-ldflags.patch

package info (click to toggle)
flashcache 3.1.2%2Bgit20140801-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 800 kB
  • ctags: 892
  • sloc: ansic: 9,070; sh: 403; perl: 329; makefile: 200
file content (52 lines) | stat: -rw-r--r-- 1,187 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
Description: Honor build flags in Makefile
 The Makefile ignores CFLAGS/LDFLAGS the user may inject through dpkg-buildflags
 or any other method. To fix this, the patch below makes sure those flags are
 being injected into the build process when needed.
 .
 src/utils/Makefile: Add flags where needed
Forwarded: yes
Author: Arno Töll <debian@toell.net>

--- a/src/utils/Makefile
+++ b/src/utils/Makefile
@@ -7,33 +7,33 @@
 all: $(PROGRAMS)
 
 get_agsize: get_agsize.o
-	$(CC) $^ -o $@
+	$(LINK.o) $^ -o $@
 
 -include get_agsize.d
 
 flashcache_create: flashcache_create.o
-	$(CC) $^ -o $@
+	$(LINK.o) $^ -o $@
 
 -include flashcache_create.d
 
 flashcache_destroy: flashcache_destroy.o
-	$(CC) $^ -o $@
+	$(LINK.o) $^ -o $@
 
 -include flashcache_destroy.d
 
 flashcache_load: flashcache_load.o
-	$(CC) $^ -o $@
+	$(LINK.o) $^ -o $@
 
 -include flashcache_load.d
 
 flashcache_setioctl: flashcache_setioctl.o
-	$(CC) $^ -o $@
+	$(LINK.o) $^ -o $@
 
 -include flashcache_setioctl.d
 
 %.o: %.c
-	$(CC) -c $(CFLAGS) $*.c -o $*.o
-	@$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
+	$(COMPILE.c) $*.c -o $*.o
+	@$(COMPILE.c) -MM -MF $*.d -MT $*.o $*.c
 
 .PHONY: install
 install: $(PROGRAMS)