aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-02 14:22:34 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-02 14:22:34 +0000
commite5ff066539f1719b0256f6648d242db5b5a5164f (patch)
tree5d4cfb0b4fdc810f0e64146514fc177641dbc327 /Makefile
parent65741989938f91bfcfd91d655adcd7aa57f44511 (diff)
downloadtermo-e5ff066539f1719b0256f6648d242db5b5a5164f.tar.gz
termo-e5ff066539f1719b0256f6648d242db5b5a5164f.tar.xz
termo-e5ff066539f1719b0256f6648d242db5b5a5164f.zip
Added 'make install' target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ff496ca..90f3029 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,10 @@ CFLAGS_DEBUG=
SONAME=libtermkey.so.0
+PREFIX=/usr/local
+LIBDIR=$(PREFIX)/lib
+INCDIR=$(PREFIX)/include
+
ifeq ($(DEBUG),1)
CFLAGS_DEBUG=-ggdb -DDEBUG
endif
@@ -23,3 +27,11 @@ libtermkey.so: termkey.o driver-csi.o driver-ti.o
.PHONY: clean
clean:
rm -f *.o demo
+
+.PHONY: install
+install:
+ install -d $(DESTDIR)$(INCDIR)
+ install -m644 termkey.h $(DESTDIR)$(INCDIR)
+ install -d $(DESTDIR)$(LIBDIR)
+ install libtermkey.so $(DESTDIR)$(LIBDIR)/$(SONAME)
+ ln -sf $(SONAME) $(DESTDIR)$(LIBDIR)/libtermkey.so