Summary Files Commits Branches @commit @diff @stats
path: root / Makefile
diff options
context:
space:
mode:
1 files changed, 6 insertions, 6 deletions
-rw-r--r--Makefile12
diff --git a/Makefile b/Makefile
index 2635716..7bd30db 100644
--- a/Makefile
+++ b/Makefile
@@ -12,21 +12,21 @@ TRANS = fr.mo
CC = cc
CFLAGS = -g -Wall -Wextra
-CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\"
+CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_DEFAULT_SOURCE
LIBS = `pkg-config --libs $(DEPS)`
all: $(OBJS) $(TRANS)
-%.mo:
- mkdir -p locale/$*/LC_MESSAGES
- msgfmt -o locale/$*/LC_MESSAGES/$(PACKAGE).mo po/$*.po
-
-po/messages.pot:
+po/messages.pot: badwolf.c
xgettext --keyword=_ --language=C -o $@ --add-comments --sort-output -j badwolf.c
po/%.po: po/messages.pot
msgmerge --update $@ $<
+${TRANS}: po/${@:.mo=.po}
+ mkdir -p locale/${@:.mo=}/LC_MESSAGES
+ msgfmt -o locale/${@:.mo=}/LC_MESSAGES/$(PACKAGE).mo po/${@:.mo=.po}
+
.c:
$(CC) -std=c11 $(CFLAGS) $(CDEPS) -o $@ $< $(LDFLAGS) $(LIBS)