From f63b976dac9debd10295d9fb54819f508ac38d66 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Thu, 23 Feb 2023 17:13:26 +0100 Subject: Add install target --- Makefile | 11 +++++++++++ config.mk | 4 ++++ 2 files changed, 15 insertions(+) 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 -- cgit v1.2.3