Build and distribute object files
This commit is contained in:
parent
f747c3c343
commit
7a0b6218c7
11
Makefile
11
Makefile
@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user