aboutsummaryrefslogtreecommitdiff
path: root/utils/unrar/patches/100-makefile_fixes.patch
blob: 610379c8d7e092344037caf46d53941a3c7ff0de (plain)
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
--- a/makefile
+++ b/makefile
@@ -2,14 +2,14 @@
 # Makefile for UNIX - unrar
 
 # Linux using GCC
-CXX=c++
-CXXFLAGS=-march=native -O2 -std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
-LIBFLAGS=-fPIC
+CXX?=c++
+CXXFLAGS?=-march=native -O2 -std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
+LIBFLAGS?=-fPIC
 DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
-STRIP=strip
-AR=ar
-LDFLAGS=-pthread
-DESTDIR=/usr
+STRIP?=strip
+AR?=ar
+LDFLAGS?=-lpthread
+DESTDIR?=/usr
 
 ##########################
 
@@ -69,7 +69,7 @@ uninstall-unrar:
 			rm -f $(DESTDIR)/bin/unrar
 
 install-lib:
-		install libunrar.so $(DESTDIR)/lib
+		install -D libunrar.so $(DESTDIR)/lib/libunrar.so
 		install libunrar.a $(DESTDIR)/lib
 
 uninstall-lib: