From 9cc1a2c0e62c75dc7afd20d5e337953f44693b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iva=C8=99cu?= Date: Tue, 9 Apr 2019 16:07:39 +0300 Subject: [PATCH] Build static library too --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d6ff1b0..d81153c 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,14 @@ LIBUCONTEXT_S_SRC = $(wildcard arch/${ARCH}/*.S) LIBUCONTEXT_OBJ = ${LIBUCONTEXT_C_SRC:.c=.o} ${LIBUCONTEXT_S_SRC:.S=.o} LIBUCONTEXT_SOVERSION = 0 LIBUCONTEXT_NAME = libucontext.so +LIBUCONTEXT_STATIC_NAME = libucontext.a LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION} LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME} -all: ${LIBUCONTEXT_SONAME} +all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME} + +${LIBUCONTEXT_STATIC_NAME}: ${LIBUCONTEXT_OBJ} + $(AR) rcs ${LIBUCONTEXT_STATIC_NAME} ${LIBUCONTEXT_OBJ} ${LIBUCONTEXT_NAME}: ${LIBUCONTEXT_OBJ} $(CC) -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \