Build static library too

pull/13/head
Gabriel Ivașcu 2019-04-09 16:07:39 +03:00
parent 7599fe5ff2
commit 9cc1a2c0e6
1 changed files with 5 additions and 1 deletions

View File

@ -8,10 +8,14 @@ LIBUCONTEXT_S_SRC = $(wildcard arch/${ARCH}/*.S)
LIBUCONTEXT_OBJ = ${LIBUCONTEXT_C_SRC:.c=.o} ${LIBUCONTEXT_S_SRC:.S=.o} LIBUCONTEXT_OBJ = ${LIBUCONTEXT_C_SRC:.c=.o} ${LIBUCONTEXT_S_SRC:.S=.o}
LIBUCONTEXT_SOVERSION = 0 LIBUCONTEXT_SOVERSION = 0
LIBUCONTEXT_NAME = libucontext.so LIBUCONTEXT_NAME = libucontext.so
LIBUCONTEXT_STATIC_NAME = libucontext.a
LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION} LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION}
LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME} 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} ${LIBUCONTEXT_NAME}: ${LIBUCONTEXT_OBJ}
$(CC) -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \ $(CC) -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \