Build and distribute object files

This commit is contained in:
Alex D. 2021-08-13 15:00:03 +00:00
parent f747c3c343
commit 7a0b6218c7
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 3 additions and 8 deletions

View File

@ -36,24 +36,19 @@ endif
SRC = dynarray.c
HDR = dynarray.h
LIB = dynarray.a
OBJ = ${SRC:.c=.o}
all: ${LIB}
all: ${OBJ}
.c.o:
${CC} -c ${CFLAGS} $<
${LIB}: ${OBJ}
${AR} rc $@ $?
${RANLIB} $@
clean:
rm -f ${LIB} ${OBJ}
rm -f ${OBJ}
install: all
mkdir -p "${DESTDIR}${PREFIX}/lib/corelibs"
cp -f ${LIB} "${DESTDIR}${PREFIX}/lib/corelibs"
cp -f ${OBJ} "${DESTDIR}${PREFIX}/lib/corelibs"
mkdir -p "${DESTDIR}${PREFIX}/include/corelibs"
cp -f ${HDR} "${DESTDIR}${PREFIX}/include/corelibs"