forked from ariadne/libucontext
Makefile: Handle static library at clean/install
parent
05cb8ecbee
commit
2e15b38327
|
@ -34,5 +34,6 @@ Makefile.in
|
|||
|
||||
*.o
|
||||
test_libucontext
|
||||
libucontext.a
|
||||
libucontext.so
|
||||
libucontext.so.*
|
||||
|
|
5
Makefile
5
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}
|
||||
|
|
Loading…
Reference in New Issue