blob: a3036be5037111878c6e87cf0337853fcb088ae0 (
plain) (
tree)
|
|
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
|