blob: 3995417051ffbdec816420ea2b7bfe91d0ff58d6 (
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
34
35
36
37
38
39
40
41
42
43
44
45
|
diff --git a/Makefile b/Makefile
index 089fd33..249b621 100644
--- a/Makefile
+++ b/Makefile
@@ -1,25 +1,26 @@
-prefix ?= /usr/local
+DESTDIR ?= /usr/local
+LIB ?= lib
all:
- $(error "Usage: make [prefix=/install/me/here] install | uninstall")
+ $(error "Usage: make [DESTDIR=/install/me/here] install | uninstall")
install:
- mkdir -p $(prefix)/include/libspotify
- install include/libspotify/api.h $(prefix)/include/libspotify
+ mkdir -p $(DESTDIR)/include/libspotify
+ install include/libspotify/api.h $(DESTDIR)/include/libspotify
- mkdir -p $(prefix)/lib
- install -T lib/libspotify.so.12 $(prefix)/lib/libspotify.so.12.1.51
+ mkdir -p $(DESTDIR)/$(LIB)
+ install -T lib/libspotify.so.12 $(DESTDIR)/$(LIB)/libspotify.so.12.1.51
- cd $(prefix)/lib && ln -sf libspotify.so.12.1.51 libspotify.so.12 && ln -sf libspotify.so.12.1.51 libspotify.so
+ cd $(DESTDIR)/$(LIB) && ln -sf libspotify.so.12.1.51 libspotify.so.12 && ln -sf libspotify.so.12.1.51 libspotify.so
- mkdir -p $(prefix)/lib/pkgconfig
- sed -e s:PKG_PREFIX:$(prefix):g <lib/pkgconfig/libspotify.pc >$(prefix)/lib/pkgconfig/libspotify.pc
+ mkdir -p $(DESTDIR)/$(LIB)/pkgconfig
+ sed -e s:PKG_PREFIX:$(DESTDIR):g <lib/pkgconfig/libspotify.pc >$(DESTDIR)/$(LIB)/pkgconfig/libspotify.pc
ldconfig
uninstall:
- rm -rf $(prefix)/include/libspotify
- rm -f $(prefix)/lib/libspotify.so.12.1.51
- rm -f $(prefix)/lib/libspotify.so.12
- rm -f $(prefix)/lib/libspotify.so
- rm -f $(prefix)/lib/pkgconfig/libspotify.pc
+ rm -rf $(DESTDIR)/include/libspotify
+ rm -f $(DESTDIR)/lib/libspotify.so.12.1.51
+ rm -f $(DESTDIR)/lib/libspotify.so.12
+ rm -f $(DESTDIR)/lib/libspotify.so
+ rm -f $(DESTDIR)/lib/pkgconfig/libspotify.pc
|