blob: 37f1d66a56e5bfe9b5f6ddc91cd26aeb2f4836dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
.POSIX:
CFLAGS = -std=c11 -pipe -O3 -Wall -Wextra -Werror -pedantic
PREFIX = /usr
MANDIR = ${PREFIX}/share/man
sources = liblux.o lux.h
outputs = liblux.so liblux.a
all: ${outputs}
liblux.o: liblux.c
liblux.a: ${sources}
${AR} ${ARFLAGS} $@ liblux.o
liblux.so: ${sources}
${CC} ${CFLAGS} -o $@ -fPIC -shared liblux.o
install:
mkdir -p ${PREFIX}/include ${PREFIX}/lib ${MANDIR}/man3
cp ${outputs} ${PREFIX}/lib
cp lux.h ${PREFIX}/include
cp man/* ${MANDIR}/man3
file=/usr/share/groff/current/tmac/mdoc/doc-syms; \
grep '^\.ds doc-str-Lb-liblux' $$file > /dev/null || \
cat man/Lb-desc.tmac >> $$file
clean:
rm -f ${outputs} liblux.o
|