aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-02-23 17:13:26 +0100
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-02-23 17:13:26 +0100
commitf63b976dac9debd10295d9fb54819f508ac38d66 (patch)
treec0ce1eaf556cbc9ee9e7d98ee6cce84c12b1700c
parente6a9f8fc97c80bf50e85012af944f9eb713ee645 (diff)
downloadstring2-f63b976dac9debd10295d9fb54819f508ac38d66.tar.gz
string2-f63b976dac9debd10295d9fb54819f508ac38d66.zip
Add install target
-rw-r--r--Makefile11
-rw-r--r--config.mk4
2 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2555128..b2492ab 100644
--- a/Makefile
+++ b/Makefile
@@ -44,5 +44,16 @@ clean:
tests: all
cd test && make clean tests
+${INSTALL_LIB_DIR}:
+ mkdir -p $@
+
+${INSTALL_INC_DIR}:
+ mkdir -p $@
+
+install: all ${INSTALL_LIB_DIR} ${INSTALL_INC_DIR}
+ cp ${LIBNAME:=.a} ${INSTALL_LIB_DIR}/${LIBNAME:=.a}
+ cp ${LIBNAME:=.so} ${INSTALL_LIB_DIR}/${LIBNAME:=.so}
+ cp src/string2.h ${INSTALL_INC_DIR}/string2.h
+
# Generated by makemk script
include target.mk
diff --git a/config.mk b/config.mk
index c197166..6bd3e66 100644
--- a/config.mk
+++ b/config.mk
@@ -4,6 +4,10 @@ NAME = string2
LIBNAME = lib${NAME}
LIBVER = 0.0.0-a3
+PREFIX = /usr/local
+INSTALL_LIB_DIR = ${PREFIX}/lib/aiezzi/${NAME}
+INSTALL_INC_DIR = ${PREFIX}/include/aiezzi/${NAME}
+
# Directories
SRCDIR = src
ARDIR = bin/archive