new: better way of handling files db

This commit is contained in:
ngn
2024-07-06 03:48:23 +03:00
parent 98e5c861df
commit 3a6f1c06c0
15 changed files with 396 additions and 437 deletions

View File

@ -5,26 +5,28 @@ PO_SRCS = $(wildcard locale/*/*/*.po)
PO_OUTS = $(patsubst locale/%.po,locale/%.mo,$(PO_SRCS))
PO_DIRS = $(wildcard locale/*/*)
SRCS = $(wildcard src/*.c) $(wildcard src/*/*.c)
OBJS = $(patsubst src/%.c,dist/%.o,$(SRCS))
HDRS = $(wildcard include/*.h)
CFLAGS = -O3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection
LIBS = -lpthread -larchive -linih -lgpgme -lsqlite3
SRCS = $(wildcard src/*.c) $(wildcard src/*/*.c)
OBJS = $(patsubst src/%.c,dist/%.o,$(SRCS))
HDRS = $(wildcard include/*.h)
CFLAGS = -O3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection
LIBS = -lpthread -larchive -linih -lgpgme -lsqlite3
DEBUG = 0
VERSION = 24.00
all: dist/libmp.so $(PO_OUTS)
all: dist dist/libmp.so $(PO_OUTS)
dist/libmp.so: $(OBJS)
$(CC) -shared -o $@ $^ $(LIBS) $(CFLAGS)
dist/%.o: src/%.c
dist:
mkdir -p dist/ctx
mkdir -p dist/mptp
mkdir -p dist/pool
mkdir -p dist/package
mkdir -p dist/database
dist/libmp.so: $(OBJS)
$(CC) -shared -o $@ $^ $(LIBS) $(CFLAGS)
dist/%.o: src/%.c
$(CC) -c -Wall -fPIC -o $@ $^ $(LIBS) $(CFLAGS) -DLM_VERSION=\"${VERSION}\" -DLM_DEBUG=${DEBUG}
locale/%.mo: locale/%.po