blob: d0bfcafcc3d938f550f27b461f504073d41e46c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
CC = cc
CFLAGS = -Wall -Wextra -Wpedantic -std=c23 \
-I$$(brew --prefix gettext)/include \
-L$$(brew --prefix gettext)/lib \
-lintl
PODIR = /usr/local/share/locale
all: tiktok
tiktok: main.c
$(CC) $(CFLAGS) -DPODIR='"$(PODIR)"' -o $@ $<
extract:
xgettext --from-code=UTF-8 -k_ -o po/tiktok.pot main.c
find po -name '*.po' -exec msgmerge {} po/tiktok.pot -o {} \;
translations:
find po -name '*.po' | while read -r file; do msgfmt "$$file" -o "$${file%po}mo"; done
clean:
rm tiktok
find po -name '*.mo' -delete
|