]> rtime.felk.cvut.cz Git - sojka/can-utils.git/commitdiff
To simplify packaging of can-utils, add DESTDIR and PREFIX support to
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 17 Mar 2010 19:12:26 +0000 (19:12 +0000)
committerOliver Hartkopp <socketcan@hartkopp.net>
Wed, 17 Mar 2010 19:12:26 +0000 (19:12 +0000)
the can-utils Makefile.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Makefile

index 3475376c8933211c2c9137bd4a5a2b1ba9af733a..550e94ba2596181ba4000a39be5cab034f07970f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,9 @@
 #
 #  Send feedback to <socketcan-users@lists.berlios.de>
 
+DESTDIR =
+PREFIX = /usr/local
+
 KERNELDIR = ../kernel/2.6
 
 MAKEFLAGS = -k
@@ -61,7 +64,8 @@ clean:
        rm -f $(PROGRAMS) *.o
 
 install:
-       cp -f $(PROGRAMS) /usr/local/bin
+       mkdir -p $(DESTDIR)$(PREFIX)/bin
+       cp -f $(PROGRAMS) $(DESTDIR)$(PREFIX)/bin
 
 distclean:
        rm -f $(PROGRAMS) *.o *~