Package: m2vrequantiser / 1.1-3

1001-makefile.patch Patch series | download
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
Description: Handle DESTDIR variable to properly install stuff.
Author: Alessio Treglia <alessio@debian.org>
Forwarded: no
---
 Makefile |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- m2vrequantiser.orig/Makefile
+++ m2vrequantiser/Makefile
@@ -1,6 +1,6 @@
 PREFIX    ?= /usr/local
 CC         = gcc
-CFLAGS    ?= -O2 -g -funroll-loops -frename-registers
+CFLAGS    += -funroll-loops -frename-registers
 CFLAGS    += -D_LARGEFILE_SOURCE -DLARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_REENTRANT
 CFLAGS    += -Wall
 OBJECTS    = main.o
@@ -14,14 +14,14 @@ M2VRequantiser : $(OBJECTS)
 	$(CC) $(CFLAGS) $(OBJECTS) $(LDFLAGS) $(LOADLIBES) -o M2VRequantiser
 
 %.o : %.c
-	$(CC) $(CFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
 
 install:	all
-	$(INSTALL) -d $(PREFIX)/bin
-	$(INSTALL) -m 755 M2VRequantiser $(PREFIX)/bin
+	$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
+	$(INSTALL) -m 755 M2VRequantiser $(DESTDIR)$(PREFIX)/bin
 	
 uninstall:
-	rm -f $(PREFIX)/bin/M2VRequantiser
+	rm -f $(DESTDIR)$(PREFIX)/bin/M2VRequantiser
 
 clean:
 	rm -f M2VRequantiser *.o *~ core