use DESTDIR for easy packaging
authorChristian Hesse <mail@eworm.de>
Fri, 31 Jul 2015 12:49:54 +0000 (14:49 +0200)
committerCharles Lehner <cel@celehner.com>
Fri, 31 Jul 2015 13:39:48 +0000 (09:39 -0400)
Signed-off-by: Christian Hesse <mail@eworm.de>
Makefile

index 4f3f7df9d602356e6ff012be4d72a38a00e79044..505d3da7743e98669ef92c4ecd09b3bedb97ff5a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,10 +16,11 @@ $(PLUGINS_DIR):
        mkdir -p $@
 
 install: $(LIB) | $(PLUGINS_DIR)
-       cp $< $|
+       mkdir -p $(DESTDIR)$(PLUGINS_DIR)
+       cp $< $(DESTDIR)$|
 
 uninstall:
-       rm $(PLUGINS_DIR)/$(LIB)
+       rm $(DESTDIR)$(PLUGINS_DIR)/$(LIB)
 
 clean:
        rm -f *.o $(LIB)