blob: a3036be5037111878c6e87cf0337853fcb088ae0 (
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
31
32
33
34
35
36
|
AR = ar
CC = cc
CFLAGS = -g -O0 -Wall -Wextra -Wno-discarded-qualifiers
TARGET_LIB_DYNAMIC = libyuri.so
TARGET_LIB_STATIC = libyuri.a
PREFIX = /usr
OBJS = yuri.o decode.o encode.o normalize.o strlcpy.o strlcat.o
MANPAGES =
all: $(TARGET_LIB_STATIC) $(TARGET_LIB_DYNAMIC)
$(TARGET_LIB_STATIC): $(OBJS)
$(AR) rcs $@ $(OBJS)
$(TARGET_LIB_DYNAMIC): $(OBJS)
$(CC) -shared -o $@ $(OBJS)
test: $(TARGET_LIB_STATIC)
$(CC) -O0 -g -o $@ test.c $(TARGET_LIB_STATIC)
install: all
mkdir -p $(PREFIX)/lib
cp $(TARGET_LIB_STATIC) $(PREFIX)/lib
cp $(TARGET_LIB_DYNAMIC) $(PREFIX)/lib
ldconfig -n $(PREFIX)/lib
mkdir -p $(PREFIX)/include
cp gemtext.h $(PREFIX)/include
mkdir -p $(PREFIX)/share/man/man3
cp $(MANPAGES) $(PREFIX)/share/man/man3
clean:
rm -f $(TARGET_LIB_STATIC) $(TARGET_LIB_DYNAMIC) $(OBJS) test
.PHONY: all clean
|