aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 54c3676421ade7175e81fd5b5b1cea11355c347c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# See LICENSE file for copyright and license details.

CC   = cc
SRC != find * -name '*.c'
OBJ  = ${SRC:.c=.o}

LIBNAME = liblog

CFLAGS  = -O2 -pipe -Wall -Werror --std=c89 -ansi
LDFLAGS =

${LIBNAME:=.so}: ${OBJ}
	${CC} ${LDFLAGS} -shared ${OBJ} -o $@

${LIBNAME:=.a}: ${OBJ}
	ar rcs $@ ${OBJ}

.c.o:
	${CC} ${CFLAGS} -c $<

all: ${LIBNAME:=.so} ${LIBNAME:=.a}

clean:
	rm -f *.o ${LIBNAME}.*