aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-07-18 08:59:03 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-07-18 08:59:03 +0300
commitea5343af6188763b2641fc292a33548cb0381256 (patch)
treed92ac52b508dee61359ce24f066a0dd0ceffab1a /Makefile
parent43968691c2a7f1f95cf7476fc8ab3c0bba8bab54 (diff)
downloadmagi-ea5343af6188763b2641fc292a33548cb0381256.tar
magi-ea5343af6188763b2641fc292a33548cb0381256.tar.xz
magi-ea5343af6188763b2641fc292a33548cb0381256.zip
Install make target was added.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index eaadd6f..f6491d8 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,12 @@
DEBUG ?= no
# Specify your favourite C compiler here:
CC ?= gcc
+# Specify your include directory (headers location):
+INCDIR ?= /usr/include
+# Specify your libraries directory:
+LIBDIR ?= /usr/lib
+# Specify location of man pages on your machine:
+MANDIR ?= /usr/share/man
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -25,6 +31,7 @@ INCLUDE = include
BUILD = build
SRCDIR = src
EXADIR = examples
+MAN = man
# Library itself:
LIB = libmagi.a
# Modules:
@@ -63,6 +70,16 @@ examples: all $(XBLD) $(EXAMPLES)
clean:
rm -f $(TARGET) $(OBJ) $(EXAMPLES) $(DEPS)
+install: all
+ cp -r $(INCLUDE)/* $(INCDIR)
+ cp $(TARGET) $(LIBDIR)
+ cp $(MAN)/* $(MANDIR)/man3
+
+uninstall:
+ rm -r $(INCDIR)/magi.h $(INCDIR)/magi.hpp $(INCDIR)/magi
+ rm $(LIBDIR)/$(LIB)
+ rm $(MANDIR)/man3/magi.3 $(MANDIR)/man3/libmagi.3
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Compilation