new: debug and version macros, cleaning up client/server APIs

This commit is contained in:
ngn
2024-06-28 20:51:56 +03:00
parent 6c2f34e8d5
commit 3b19e2840b
25 changed files with 231 additions and 128 deletions

View File

@ -11,6 +11,7 @@ HDRS = $(wildcard include/*.h)
CFLAGS = -O3 -march=native -fstack-protector-strong -fcf-protection=full -fstack-clash-protection
LIBS = -larchive -linih -lgpgme
DEBUG = 0
VERSION = 24.00
all: dist/libmp.so $(PO_OUTS)
@ -24,7 +25,7 @@ dist/%.o: src/%.c
mkdir -p dist/pkg
mkdir -p dist/mptp
mkdir -p dist/pool
$(CC) -c -Wall -fPIC -o $@ $^ $(LIBS) $(CFLAGS) -DVERSION=\"${VERSION}\"
$(CC) -c -Wall -fPIC -o $@ $^ $(LIBS) $(CFLAGS) -DLM_VERSION=\"${VERSION}\" -DLM_DEBUG=${DEBUG}
locale/%.mo: locale/%.po
msgfmt $^ -o $@