From 2e15b383272fafbbb92882990b8f339e2c6888d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iva=C8=99cu?= Date: Fri, 12 Apr 2019 10:48:24 +0300 Subject: [PATCH] Makefile: Handle static library at clean/install --- .gitignore | 1 + Makefile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4fb95ca..d2e350f 100644 --- a/.gitignore +++ b/.gitignore @@ -34,5 +34,6 @@ Makefile.in *.o test_libucontext +libucontext.a libucontext.so libucontext.so.* diff --git a/Makefile b/Makefile index d81153c..8a605fd 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ LIBUCONTEXT_NAME = libucontext.so LIBUCONTEXT_STATIC_NAME = libucontext.a LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION} LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME} +LIBUCONTEXT_STATIC_PATH = /lib/${LIBUCONTEXT_STATIC_NAME} all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME} @@ -31,10 +32,12 @@ ${LIBUCONTEXT_SONAME}: ${LIBUCONTEXT_NAME} $(CC) -fPIC -DPIC ${CFLAGS} ${CPPFLAGS} -c -o $@ $< clean: - rm -f ${LIBUCONTEXT_NAME} ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_OBJ} test_libucontext + rm -f ${LIBUCONTEXT_NAME} ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME} \ + ${LIBUCONTEXT_OBJ} test_libucontext install: all install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}/${LIBUCONTEXT_PATH} + install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}/${LIBUCONTEXT_STATIC_PATH} ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}/lib/${LIBUCONTEXT_NAME} check: test_libucontext ${LIBUCONTEXT_SONAME}