From 789bd6ab0908fc0b21a4f82bf2a67dbbc5232cc3 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 6 Jan 2008 23:30:20 +0000 Subject: Install the static archive in /usr/lib --- src/lib.mk | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/lib.mk') diff --git a/src/lib.mk b/src/lib.mk index 0ff4baa2..272d9077 100644 --- a/src/lib.mk +++ b/src/lib.mk @@ -3,9 +3,11 @@ # Copyright 2008 Roy Marples +LIBNAME?= lib + SHLIB_NAME= lib${LIB}.so.${SHLIB_MAJOR} SHLIB_LINK= lib${LIB}.so -SHLIBDIR?= /lib +SHLIBDIR?= /${LIBNAME} SONAME?= ${SHLIB_NAME} OBJS+= ${SRCS:.c=.o} @@ -16,13 +18,15 @@ ECHO?= echo AR?= ar RANLIB?= ranlib INSTALL?= install -LIBMODE?= 0444 PICFLAG?= -fPIC INCDIR?= /usr/include INCMODE?= 0444 +LIBDIR?= /usr/${LIBNAME} +LIBMODE?= 0444 + .SUFFIXES: .So .c.So: @@ -30,8 +34,6 @@ INCMODE?= 0444 all: ${_LIBS} - - lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static library $@ ${AR} rc $@ $^ @@ -49,9 +51,11 @@ ${SHLIB_NAME}: ${SOBJS} ${SOBJS} ${LDADD} install: all + ${INSTALL} -d ${DESTDIR}${LIBDIR} + ${INSTALL} -m ${LIBMODE} lib${LIB}.a ${DESTDIR}${LIBDIR} ${INSTALL} -d ${DESTDIR}${SHLIBDIR} ${INSTALL} -m ${LIBMODE} ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR} - ln -fs ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK} + ln -fs ${SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK} ${INSTALL} -d ${DESTDIR}${INCDIR} for x in ${INCS}; do ${INSTALL} -m ${INCMODE} $$x ${DESTDIR}${INCDIR}; done -- cgit v1.2.3