new: implement --version option

This commit is contained in:
ngn
2024-08-15 04:34:14 +03:00
parent 22364da8be
commit d0013946f4
3 changed files with 40 additions and 19 deletions

View File

@ -5,14 +5,19 @@ PO_SRCS = $(wildcard locale/*/*/*.po)
PO_OUTS = $(patsubst locale/%.po,locale/%.mo,$(PO_SRCS))
PO_DIRS = $(wildcard locale/*/*)
CFLAGS = -fstack-protector-strong -fcf-protection=full -fstack-clash-protection
LIBS = -lncurses -lmenu -lm
prefix = /usr
CC = gcc
VERSION = 24.08
all: dist/xcfg $(PO_OUTS)
dist/xcfg: $(CSRCS) $(HEADERS)
mkdir -p dist
$(CC) $(CFLAGS) $(CSRCS) -o $@ -lncurses -lmenu -lm
$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" $(CSRCS) -o $@ $(LIBS)
locale/%.mo: locale/%.po
msgfmt $^ -o $@