summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <thomas.voss@humanwave.nl> 2025-09-05 16:33:12 +0200
committerThomas Voss <thomas.voss@humanwave.nl> 2025-09-05 16:33:12 +0200
commite1e5144c27e69ee0d2eb9589422a2de717f0053e (patch)
treec0627c2f4b00c428dad92a3ce69ccb36a7ab86f3
parentdf78b72fe58251bb31c8bc5ab34460e44220383d (diff)
Make PODIR dynamic
-rw-r--r--Makefile3
-rw-r--r--main.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e5e7cb4..d195472 100644
--- a/Makefile
+++ b/Makefile
@@ -3,11 +3,12 @@ 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) -o $@ $<
+ $(CC) $(CFLAGS) -DPODIR='"$(PODIR)"' -o $@ $<
extract:
xgettext --from-code=UTF-8 -k_ -o po/messages.pot main.c
diff --git a/main.c b/main.c
index 968a807..b8d6526 100644
--- a/main.c
+++ b/main.c
@@ -35,7 +35,7 @@ int
main(int argc, char **argv)
{
setlocale(LC_ALL, "");
- bindtextdomain("messages", "./po");
+ bindtextdomain("messages", PODIR);
textdomain("messages");
char interval = 's';